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); }