Skip to content

Commit

Permalink
remove SeriesException
Browse files Browse the repository at this point in the history
  • Loading branch information
scampower3 committed Jul 15, 2024
1 parent 9f6b8bb commit f0ec325
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions Jellyfin.Plugin.Tvdb/Providers/TvdbMovieImageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,9 @@ public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, Cancell

private async Task<IReadOnlyList<ArtworkBaseRecord>> GetMovieArtworks(int movieTvdbId, CancellationToken cancellationToken)
{
try
{
var movieInfo = await _tvdbClientManager.GetMovieExtendedByIdAsync(movieTvdbId, cancellationToken)
.ConfigureAwait(false);
return movieInfo.Artworks;
}
catch (SeriesException ex) when (ex.InnerException is JsonException)
{
_logger.LogError(ex, "Failed to retrieve movie images for {TvDbId}", movieTvdbId);
return Array.Empty<ArtworkBaseRecord>();
}
var movieInfo = await _tvdbClientManager.GetMovieExtendedByIdAsync(movieTvdbId, cancellationToken)
.ConfigureAwait(false);
return movieInfo?.Artworks ?? Array.Empty<ArtworkBaseRecord>();
}

/// <inheritdoc />
Expand Down

0 comments on commit f0ec325

Please sign in to comment.