Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
 public void GenerateData()
 {
     foreach (ShowItem si in this.mDoc.Library.GetShowItems())
     {
         ShowSummaryData show = AddShowDetails(si);
         this.showList.Add(show);
     }
 }
Esempio n. 4
0
        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);
        }
Esempio n. 5
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);
        }
Esempio n. 6
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);
        }