private static ShowSummaryData AddShowDetails([NotNull] ShowItem si) { SeriesInfo ser; lock (LocalCache.SERIES_LOCK) { ser = LocalCache.Instance.GetSeries(si.TvdbCode); } ShowSummaryData showSummary = new ShowSummaryData { ShowName = si.ShowName, ShowItem = si }; if (ser != null) { foreach (int snum in si.AppropriateSeasons().Keys) { ShowSummaryData.ShowSummarySeasonData seasonData = GetSeasonDetails(si, snum); showSummary.AddSeason(seasonData); } } return(showSummary); }
private ShowSummaryData AddShowDetails([NotNull] ShowItem si) { SeriesInfo ser; lock (TheTVDB.SERIES_LOCK) { ser = TheTVDB.Instance.GetSeries(si.TvdbCode); } ShowSummaryData showSummary = new ShowSummaryData { ShowName = si.ShowName, ShowItem = si }; if (ser != null) { foreach (int snum in si.DvdOrder? ser.DvdSeasons.Keys: ser.AiredSeasons.Keys) { ShowSummaryData.ShowSummarySeasonData seasonData = getSeasonDetails(si, ser, snum); showSummary.AddSeason(seasonData); } } return(showSummary); }
public void GenerateData() { foreach (ShowItem si in this.mDoc.Library.GetShowItems()) { ShowSummaryData show = AddShowDetails(si); this.showList.Add(show); } }
private void GenerateData() { List <ShowSummaryData> showList = new List <ShowSummaryData>(); foreach (ShowItem si in this.mDoc.GetShowItems(false)) { ShowSummaryData show = this.AddShowDetails(si); showList.Add(show); } this.PopulateGrid(showList); }
private static ShowSummaryData AddShowDetails([NotNull] ShowConfiguration si) { ShowSummaryData showSummary = new ShowSummaryData { ShowName = si.ShowName, ShowConfiguration = si }; if (si.CachedShow != null) { foreach (int snum in si.AppropriateSeasons().Keys) { ShowSummaryData.ShowSummarySeasonData seasonData = GetSeasonDetails(si, snum); if (seasonData != null) { showSummary.AddSeason(seasonData); } } } return(showSummary); }
private ShowSummaryData AddShowDetails(ShowItem si) { TheTVDB db = TheTVDB.Instance; db.GetLock("ShowSummary"); SeriesInfo ser = db.GetSeries(si.TVDBCode); ShowSummaryData showSummary = new ShowSummaryData { ShowName = si.ShowName, ShowItem = si }; if (ser != null) { foreach (int snum in si.DVDOrder? ser.DVDSeasons.Keys: ser.AiredSeasons.Keys) { ShowSummaryData.ShowSummarySeasonData seasonData = getSeasonDetails(si, ser, snum); showSummary.AddSeason(seasonData); } } db.Unlock("ShowSummary"); return(showSummary); }