示例#1
0
        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());
        }
示例#2
0
        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);
        }