From 679664ca28c9ac49f30ba73e2aaa4ad0684d40dd Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Fri, 20 Feb 2026 15:14:03 +0100 Subject: Add early returns --- src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs b/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs index 2ca42c89ef..083858ebaf 100644 --- a/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs +++ b/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs @@ -454,7 +454,7 @@ namespace Jellyfin.LiveTv.Listings { var token = await GetToken(info, cancellationToken).ConfigureAwait(false); - if (programIds.Count == 0) + if (string.IsNullOrEmpty(token) || programIds.Count == 0) { return []; } @@ -795,7 +795,10 @@ namespace Jellyfin.LiveTv.Listings var token = await GetToken(info, cancellationToken).ConfigureAwait(false); - ArgumentException.ThrowIfNullOrEmpty(token); + if (string.IsNullOrEmpty(token)) + { + return []; + } using var options = new HttpRequestMessage(HttpMethod.Get, ApiUrl + "/lineups/" + listingsId); options.Headers.TryAddWithoutValidation("token", token); -- cgit v1.2.3