public void Start(string pluginsPath = null) { if (pluginsPath == null) { pluginsPath = Directory.GetCurrentDirectory() + "\\plugins"; } var plugins = pluginManager.LoadPlugins(pluginsPath); OnPluginsLoaded?.Invoke(this, new PluginEventArgs(plugins)); OnCurrentSongChanged += pluginManager.OnCurrentSongChanged; OnStreamUpdate += pluginManager.OnStreamUpdate; OnStreamOver += pluginManager.OnStreamOver; Running = true; runningTask = Task.Run(() => GetHttpStream()); }
public void Start(string pluginsPath = null) { if (string.IsNullOrEmpty(Url)) { Radio.Log("The specified Url is empty.", this); return; } if (pluginsPath == null) { pluginsPath = Directory.GetCurrentDirectory() + "\\plugins"; } var plugins = pluginManager.LoadPlugins(pluginsPath); OnPluginsLoaded?.Invoke(this, new PluginEventArgs(plugins)); OnCurrentSongChanged += pluginManager.OnCurrentSongChanged; OnStreamStart += pluginManager.OnStreamStart; OnStreamUpdate += pluginManager.OnStreamUpdate; OnStreamOver += pluginManager.OnStreamOver; Running = true; runningTask = Task.Run(GetHttpStreamAsync); }