private void GetThread(object codeIn) { System.Diagnostics.Debug.Assert(workerSemaphore != null); try { workerSemaphore.WaitOne(); // don't start until we're allowed to SeriesSpecifier series = (SeriesSpecifier)(codeIn); bool bannersToo = TVSettings.Instance.NeedToDownloadBannerFile(); Threadslogger.Trace(" Downloading " + series.SeriesId); bool r = TheTVDB.Instance.EnsureUpdated(series.SeriesId, bannersToo, series.UseCustomLanguage, series.CustomLanguageCode); Threadslogger.Trace(" Finished " + series.SeriesId); if (!r) { downloadOk = false; if (downloadStopOnError) { DownloadDone = true; } } workerSemaphore.Release(1); } catch (Exception e) { Logger.Fatal(e, "Unhandled Exception in GetThread"); } }
private void GetThread(object codeIn) { System.Diagnostics.Debug.Assert(workerSemaphore != null); SeriesSpecifier series = (SeriesSpecifier)(codeIn); try { workerSemaphore.WaitOne(); // don't start until we're allowed to bool bannersToo = TVSettings.Instance.NeedToDownloadBannerFile(); Threadslogger.Trace(" Downloading " + series.Name); if (TheTVDB.Instance.EnsureUpdated(series, bannersToo)) { return; } downloadOk = false; if (downloadStopOnError) { DownloadDone = true; } } catch (ShowNotFoundException snfe) { problematicSeriesIds.Add(snfe.ShowId); } catch (Exception e) { Logger.Fatal(e, $"Unhandled Exception in GetThread for {series.Name} id={series.SeriesId} and lang={series.CustomLanguageCode}"); } finally { Threadslogger.Trace(" Finished " + series.SeriesId); workerSemaphore.Release(1); } }
public abstract bool EnsureUpdated(SeriesSpecifier s, bool bannersToo, bool showErrorMsgBox);