aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-02-23 21:17:52 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-02-23 21:17:52 +0100
commit100d6bb38c5f7c24ea2a8d520add63d71948077f (patch)
tree3687aa20d12e44c4fe1074e10760426bb59a0dc7
parentd63b2b2657763112fb1581a667c111e3930889f2 (diff)
Gracefully handle empty listingId
-rw-r--r--src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs b/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs
index 04589b3a8d..0b315d9a3d 100644
--- a/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs
+++ b/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs
@@ -171,7 +171,8 @@ namespace Jellyfin.LiveTv.Listings
var willBeCached = endDate.HasValue && endDate.Value < DateTime.UtcNow.AddDays(GuideManager.MaxCacheDays);
if (willBeCached && images is not null)
{
- var imageIndex = images.FindIndex(i => i.ProgramId == schedule.ProgramId);
+ var imageIndex = images.FindIndex(i =>
+ i.ProgramId is not null && schedule.ProgramId.StartsWith(i.ProgramId, StringComparison.Ordinal));
if (imageIndex > -1)
{
var programEntry = programDict[schedule.ProgramId];
@@ -938,7 +939,10 @@ namespace Jellyfin.LiveTv.Listings
public async Task<List<ChannelInfo>> GetChannels(ListingsProviderInfo info, CancellationToken cancellationToken)
{
var listingsId = info.ListingsId;
- ArgumentException.ThrowIfNullOrEmpty(listingsId);
+ if (string.IsNullOrEmpty(listingsId))
+ {
+ return [];
+ }
var token = await GetToken(info, cancellationToken).ConfigureAwait(false);