internal void StartScraperNowPlaying(string artist, string album) { try { if (Utils.GetIsStopping()) return; Utils.GetDbm().TotArtistsBeingScraped = 0.0; Utils.GetDbm().CurrArtistsBeingScraped = 0.0; Utils.AllocateDelayStop("FanartHandlerSetup-StartScraperNowPlaying"); if (MyScraperNowWorker == null) { MyScraperNowWorker = new ScraperNowWorker(); MyScraperNowWorker.ProgressChanged += new ProgressChangedEventHandler(MyScraperNowWorker.OnProgressChanged); MyScraperNowWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(MyScraperNowWorker.OnRunWorkerCompleted); } if (MyScraperNowWorker.IsBusy) return; MyScraperNowWorker.RunWorkerAsync(new string[2] { artist, album }); } catch (Exception ex) { Utils.ReleaseDelayStop("FanartHandlerSetup-StartScraperNowPlaying"); logger.Error("StartScraperNowPlaying: " + ex); } }
internal void StartScraperNowPlaying(string artist, string album, string genre) { try { if (Utils.GetIsStopping()) return; if (MyScraperNowWorker == null) { MyScraperNowWorker = new ScraperNowWorker(); MyScraperNowWorker.ProgressChanged += new ProgressChangedEventHandler(MyScraperNowWorker.OnProgressChanged); MyScraperNowWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(MyScraperNowWorker.OnRunWorkerCompleted); } if (MyScraperNowWorker.IsBusy) return; MyScraperNowWorker.RunWorkerAsync(new string[3] { artist, album, genre }); } catch (Exception ex) { logger.Error("StartScraperNowPlaying: " + ex); } }