Skip to content

Commit

Permalink
fix: check whether watchlist cache is empty before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnatamo committed Sep 9, 2024
1 parent 16862ad commit 2087d6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Provider.Plex/src/PlexWatchlistClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public async Task<IEnumerable<WatchlistMetadataItem>> FetchWatchlistAsync(int of
CacheValue<IEnumerable<WatchlistMetadataItem>> cacheValue =
await cachingProvider.GetAsync<IEnumerable<WatchlistMetadataItem>>("watchlist");

return cacheValue.Value;
if(cacheValue.HasValue)
{
return cacheValue.Value;
}
}

MediaResponse<WatchlistMetadataItem> watchlistContainer = await response
Expand Down

0 comments on commit 2087d6e

Please sign in to comment.