public static string GetSeasonImagesHtmlOverview([NotNull] this ShowItem si, [NotNull] Season s) { int snum = s.SeasonNumber; string body = ""; List <ProcessedEpisode> eis = si.SeasonEpisodes[snum]; string seasText = Season.UIFullSeasonWord(snum); if (eis.Count > 0 && eis[0].SeasonId > 0) { seasText = " - <A HREF=\"" + TheTVDB.API.WebsiteSeasonUrl(s) + "\">" + seasText + "</a>"; } else { seasText = " - " + seasText; } body += "<h1><A HREF=\"" + TheTVDB.API.WebsiteShowUrl(si) + "\">" + si.ShowName + "</A>" + seasText + "</h1>"; if (TVSettings.Instance.NeedToDownloadBannerFile()) { body += ImageSection("Series Banner", 758, 140, si.TheSeries()?.GetSeasonWideBannerPath(snum)); body += ImageSection("Series Poster", 350, 500, si.TheSeries()?.GetSeasonBannerPath(snum)); } else { body += "<h2>Images are not being downloaded for this series. Please see Options -> Preferences -> Media Center to reconfigure.</h2>"; } return(body); }
public static string SeasonName([NotNull] ShowItem si, int snum) { if (si.DvdOrder) { return(snum == 0 ? "Not Available on DVD" : "DVD " + Season.UISeasonWord(snum)); } return(Season.UIFullSeasonWord(snum)); }
public static string SeasonName([NotNull] ShowItem si, int snum) { switch (si.Order) { case Season.SeasonType.dvd: return(snum == 0 ? "Not Available on DVD" : "DVD " + Season.UISeasonWord(snum)); case Season.SeasonType.aired: return(Season.UIFullSeasonWord(snum)); default: throw new ArgumentOutOfRangeException(); } }
public static string GetSeasonImagesHtmlOverview([NotNull] this ShowItem si, [NotNull] Season s) { SeriesInfo ser = s.TheSeries; int snum = s.SeasonNumber; string body = ""; List <ProcessedEpisode> eis = si.SeasonEpisodes.ContainsKey(snum) ? si.SeasonEpisodes[snum] : ShowItem.ProcessedListFromEpisodes(s.Episodes.Values, si); string seasText = Season.UIFullSeasonWord(snum); if ((eis.Count > 0) && (eis[0].SeasonId > 0)) { seasText = " - <A HREF=\"" + TheTVDB.Instance.WebsiteUrl(si.TvdbCode, eis[0].SeasonId, false) + "\">" + seasText + "</a>"; } else { seasText = " - " + seasText; } body += "<h1><A HREF=\"" + TheTVDB.Instance.WebsiteUrl(si.TvdbCode, -1, true) + "\">" + si.ShowName + "</A>" + seasText + "</h1>"; if (TVSettings.Instance.NeedToDownloadBannerFile()) { body += ImageSection("Series Banner", 758, 140, ser.GetSeasonWideBannerPath(snum)); body += ImageSection("Series Poster", 350, 500, ser.GetSeasonBannerPath(snum)); } else { body += "<h2>Images are not being downloaded for this series. Please see Options -> Preferences -> Media Center to reconfigure.</h2>"; } return(body); }
public void PopulateGrid() { Cell colTitleModel = new Cell { ElementText = new ActorsGrid.RotatedText(-90.0f), BackColor = Color.SteelBlue, ForeColor = Color.White, TextAlignment = ContentAlignment.BottomCenter }; Cell topleftTitleModel = new Cell { BackColor = Color.SteelBlue, ForeColor = Color.White, TextAlignment = ContentAlignment.BottomLeft }; grid1.Columns.Clear(); grid1.Rows.Clear(); int maxSeason = GetMaxSeason(showList); int cols = maxSeason + 2; int rows = showList.Count + 1; // Draw Header grid1.ColumnsCount = cols; grid1.RowsCount = rows; grid1.FixedColumns = 1; grid1.FixedRows = 1; grid1.Selection.EnableMultiSelection = false; grid1.Rows[0].AutoSizeMode = SourceGrid.AutoSizeMode.MinimumSize; grid1.Rows[0].Height = 65; ColumnHeader h = new ColumnHeader("Show") { AutomaticSortEnabled = false, ResizeEnabled = false }; grid1[0, 0] = h; grid1[0, 0].View = topleftTitleModel; // Draw season for (int c = chkHideSpecials.Checked?1:0; c < maxSeason + 1; c++) { h = new ColumnHeader(Season.UIFullSeasonWord(c)) { AutomaticSortEnabled = false, ResizeEnabled = false }; grid1[0, c + 1] = h; grid1[0, c + 1].View = colTitleModel; grid1.Columns[c + 1].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; } grid1.Columns[0].Width = 150; // Draw Shows int r = 0; foreach (ShowSummaryData show in showList) { //Ignore shows with no missing episodes if (chkHideComplete.Checked && !show.HasMssingEpisodes(chkHideSpecials.Checked, chkHideIgnored.Checked)) { continue; } //Ignore shows with no missing aired episodes if (chkHideUnaired.Checked && !show.HasAiredMssingEpisodes(chkHideSpecials.Checked, chkHideIgnored.Checked)) { continue; } //Ignore shows which do not have the missing check if (chkHideNotScanned.Checked && !show.ShowItem.DoMissingCheck) { continue; } RowHeader rh = new RowHeader(show.ShowName) { ResizeEnabled = false, View = new Cell { ForeColor = show.ShowItem.DoMissingCheck ? Color.Black : Color.Gray } }; //Gray if the show is not checked for missing episodes in the scan grid1[r + 1, 0] = rh; grid1[r + 1, 0].AddController(new ShowClickEvent(this, show.ShowItem)); foreach (ShowSummaryData.ShowSummarySeasonData seasonData in show.SeasonDataList) { ShowSummaryData.SummaryOutput output = seasonData.GetOuput(); //Ignore Season if checkbox is checked if (chkHideSpecials.Checked && output.Special) { continue; } //Ignore Season if checkbox is checked if (chkHideIgnored.Checked && output.Ignored) { continue; } grid1[r + 1, seasonData.SeasonNumber + 1] = new SourceGrid.Cells.Cell(output.Details, typeof(string)) { View = new Cell { BackColor = output.Color, ForeColor = Color.White, TextAlignment = ContentAlignment.BottomRight }, Editor = { EditableMode = EditableMode.None } }; grid1[r + 1, seasonData.SeasonNumber + 1].AddController(new ShowClickEvent(this, show.ShowItem, seasonData.Season)); } r++; } grid1.AutoSizeCells(); }