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