mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-25 02:11:45 +00:00
Add early returns
This commit is contained in:
parent
b0eec00e1c
commit
679664ca28
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue