aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-02-20 15:14:03 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-02-20 15:14:03 +0100
commit679664ca28c9ac49f30ba73e2aaa4ad0684d40dd (patch)
treecfbfdb598de95774cc561e6562f7508f945b2ce8 /src
parentb0eec00e1cda109e5c6720f054932993108f0549 (diff)
Add early returns
Diffstat (limited to 'src')
-rw-r--r--src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs7
1 files changed, 5 insertions, 2 deletions
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);