public void AddTrack(FmShellArguments args) { LOGGER.Info("Adding track by file path"); var audioSource = new Mp3FileAudioSource(args.Args[0].ToString()); RadioCastServer.AddTrack(audioSource); }
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)); }
public void RunFullGC(FmShellArguments args) { System.GC.Collect(System.Int32.MaxValue, System.GCCollectionMode.Forced, false); }
public string Reload(FmShellArguments args) { Controller.ReloadConfiguration(); return("Configuration reloaded successfully!"); }
public string ShowRadioUri(FmShellArguments args) { return(RadioCastServer.Endpoint.ToString()); }
public string ShowApiUri(FmShellArguments args) { return(Context.HostUri); }
public void Stop(FmShellArguments args) { Task.Run(() => args.Shell.Stop()); }