aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.LiveTv
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2024-03-15 14:30:55 +0100
committerBond_009 <bond.009@outlook.com>2026-05-21 20:10:21 +0200
commit3d8bcf1ffd1c56efaffe9ff004c2ec44afbb9818 (patch)
tree71961b6c9f790485f20ae3195d9188665b5999b5 /src/Jellyfin.LiveTv
parente63bc1e27ceaab759fc2d2828115036d620fbd07 (diff)
Alternate solution to #7843 without extra prop
Diffstat (limited to 'src/Jellyfin.LiveTv')
-rw-r--r--src/Jellyfin.LiveTv/Guide/GuideManager.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Jellyfin.LiveTv/Guide/GuideManager.cs b/src/Jellyfin.LiveTv/Guide/GuideManager.cs
index 556516674b..c3cc70381e 100644
--- a/src/Jellyfin.LiveTv/Guide/GuideManager.cs
+++ b/src/Jellyfin.LiveTv/Guide/GuideManager.cs
@@ -448,14 +448,19 @@ public class GuideManager : IGuideManager
item.Name = channelInfo.Name;
- if (!item.HasImage(ImageType.Primary))
+ var currentPrimary = item.GetImageInfo(ImageType.Primary, 0);
+ var imageUrlIsNull = string.IsNullOrWhiteSpace(channelInfo.ImageUrl);
+
+ // Update channel image if image URL has changed
+ if (currentPrimary is null
+ || (!imageUrlIsNull && !string.Equals(currentPrimary.Path, channelInfo.ImageUrl, StringComparison.Ordinal)))
{
if (!string.IsNullOrWhiteSpace(channelInfo.ImagePath))
{
item.SetImagePath(ImageType.Primary, channelInfo.ImagePath);
forceUpdate = true;
}
- else if (!string.IsNullOrWhiteSpace(channelInfo.ImageUrl))
+ else if (!imageUrlIsNull)
{
item.SetImagePath(ImageType.Primary, channelInfo.ImageUrl);
forceUpdate = true;