private static string CreatePosterHtml(SeriesInfo ser) { if ((!string.IsNullOrEmpty(ser.GetSeriesPosterPath())) && (!string.IsNullOrEmpty(TheTVDB.GetImageURL(ser.GetSeriesPosterPath())))) { return($"<img class=\"show-poster rounded w-100\" src=\"{TheTVDB.GetImageURL(ser.GetSeriesPosterPath())}\" alt=\"{ser.Name} Show Poster\">"); } return(string.Empty); }
public static string GetShowImagesHtmlOverview(this ShowItem si) { SeriesInfo ser = si.TheSeries(); string body = $"<h1><A HREF=\"{TheTVDB.Instance.WebsiteUrl(si.TvdbCode, -1, true)}\">{si.ShowName}</A> </h1>"; body += ImageSection("Show Banner", 758, 140, ser.GetSeriesWideBannerPath()); body += ImageSection("Show Poster", 350, 500, ser.GetSeriesPosterPath()); body += ImageSection("Show Fanart", 960, 540, ser.GetSeriesFanartPath()); return(body); }
public static string GetShowImagesHtmlOverview([NotNull] this ShowItem si) { string body = $"<h1><A HREF=\"{TheTVDB.API.WebsiteShowUrl(si)}\">{si.ShowName}</A> </h1>"; SeriesInfo ser = si.TheSeries(); if (ser is null) { return(body); } body += ImageSection("Show Banner", 758, 140, ser.GetSeriesWideBannerPath()); body += ImageSection("Show Poster", 350, 500, ser.GetSeriesPosterPath()); body += ImageSection("Show Fanart", 960, 540, ser.GetSeriesFanartPath()); return(body); }
public override ItemList ProcessShow(ShowItem si, bool forceRefresh) { ItemList theActionList = new ItemList(); if (!TVSettings.Instance.FolderJpg) { return(theActionList); } if (si is null) { return(theActionList); } FileInfo fi = FileHelper.FileInFolder(si.AutoAddFolderBase, DEFAULT_FILE_NAME); bool fileDoesntExist = !doneFolderJpg.Contains(fi.FullName) && !fi.Exists; if (forceRefresh || fileDoesntExist) { SeriesInfo series = si.TheSeries(); if (series is null) { return(theActionList); } //default to poster when we want season posters for the season specific folders string downloadPath = TVSettings.Instance.SeasonSpecificFolderJPG() ? series.GetSeriesPosterPath() : series.GetImage(TVSettings.Instance.ItemForFolderJpg()); if (!string.IsNullOrEmpty(downloadPath)) { theActionList.Add(new ActionDownloadImage(si, null, fi, downloadPath, false)); } doneFolderJpg.Add(fi.FullName); } return(theActionList); }