Example #1
0
        public void AddTrack(FmShellArguments args)
        {
            LOGGER.Info("Adding track by file path");
            var audioSource = new Mp3FileAudioSource(args.Args[0].ToString());

            RadioCastServer.AddTrack(audioSource);
        }
Example #2
0
 public string Help(FmShellArguments args)
 {
     return($"Commands: " + typeof(ShellMethods).GetMethods().Where(mi => mi.IsPublic && mi.GetParameters().Length > 0 && mi.GetParameters().First().ParameterType == typeof(FmShellArguments)).Select(mi => mi.Name).Aggregate("", (one, acc) => one + "\n" + acc));
 }
Example #3
0
 public void RunFullGC(FmShellArguments args)
 {
     System.GC.Collect(System.Int32.MaxValue, System.GCCollectionMode.Forced, false);
 }
Example #4
0
 public string Reload(FmShellArguments args)
 {
     Controller.ReloadConfiguration();
     return("Configuration reloaded successfully!");
 }
Example #5
0
 public string ShowRadioUri(FmShellArguments args)
 {
     return(RadioCastServer.Endpoint.ToString());
 }
Example #6
0
 public string ShowApiUri(FmShellArguments args)
 {
     return(Context.HostUri);
 }
Example #7
0
 public void Stop(FmShellArguments args)
 {
     Task.Run(() => args.Shell.Stop());
 }