The Free Software Media System - Server Backend & API
Link up XMLTV background images and episode thumbnails with the internal program model
Shea Smith8e2c5607eff3
diff --git a/src/Jellyfin.LiveTv/Listings/XmlTvListingsProvider.cs b/src/Jellyfin.LiveTv/Listings/XmlTvListingsProvider.csindex ec2e6cfcc9..7088d1f0bf 100644--- a/src/Jellyfin.LiveTv/Listings/XmlTvListingsProvider.cs+++ b/src/Jellyfin.LiveTv/Listings/XmlTvListingsProvider.cs@@ -12,6 +12,7 @@ using System.Threading.Tasks;using Jellyfin.Extensions;using Jellyfin.XmlTv;using Jellyfin.XmlTv.Entities;+using Jellyfin.XmlTv.Enums;using MediaBrowser.Common.Extensions;using MediaBrowser.Common.Net;using MediaBrowser.Controller.Configuration;@@ -180,6 +181,8 @@ namespace Jellyfin.LiveTv.Listingsstring? episodeTitle = program.Episode?.Title;var programCategories = program.Categories.Where(c => !string.IsNullOrWhiteSpace(c)).ToList();var imageUrl = program.Icons.FirstOrDefault()?.Source;+ var episodeImageUrl = program.Images?.FirstOrDefault(m => m.Type == ImageType.Still)?.Path;+ var backgroundImageUrl = program.Images?.FirstOrDefault(m => m.Type == ImageType.Backdrop)?.Path;var rating = program.Ratings.FirstOrDefault()?.Value;var starRating = program.StarRatings?.FirstOrDefault()?.StarRating;@@ -205,6 +208,8 @@ namespace Jellyfin.LiveTv.ListingsIsSports = programCategories.Any(c => info.SportsCategories.Contains(c, StringComparison.OrdinalIgnoreCase)),ImageUrl = string.IsNullOrEmpty(imageUrl) ? null : imageUrl,HasImage = !string.IsNullOrEmpty(imageUrl),+ BackdropImageUrl = string.IsNullOrEmpty(backgroundImageUrl) ? null : backgroundImageUrl,+ ThumbImageUrl = string.IsNullOrEmpty(episodeImageUrl) ? null : episodeImageUrl,OfficialRating = string.IsNullOrEmpty(rating) ? null : rating,CommunityRating = starRating is null ? null : (float)starRating.Value,SeriesId = program.Episode?.Episode is null ? null : program.Title?.GetMD5().ToString("N", CultureInfo.InvariantCulture)