mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
Merge pull request #4220 from Spacetech/TvdbEpisodeImageProvider_nullable_check
Fix invalid operation exception in TvdbEpisodeImageProvider.GetImages
This commit is contained in:
commit
c94d774ee7
@ -56,6 +56,10 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||||||
{
|
{
|
||||||
// Process images
|
// Process images
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
string episodeTvdbId = null;
|
||||||
|
|
||||||
|
if (episode.IndexNumber.HasValue && episode.ParentIndexNumber.HasValue)
|
||||||
{
|
{
|
||||||
var episodeInfo = new EpisodeInfo
|
var episodeInfo = new EpisodeInfo
|
||||||
{
|
{
|
||||||
@ -64,14 +68,17 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||||||
SeriesProviderIds = series.ProviderIds,
|
SeriesProviderIds = series.ProviderIds,
|
||||||
SeriesDisplayOrder = series.DisplayOrder
|
SeriesDisplayOrder = series.DisplayOrder
|
||||||
};
|
};
|
||||||
string episodeTvdbId = await _tvdbClientManager
|
|
||||||
|
episodeTvdbId = await _tvdbClientManager
|
||||||
.GetEpisodeTvdbId(episodeInfo, language, cancellationToken).ConfigureAwait(false);
|
.GetEpisodeTvdbId(episodeInfo, language, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(episodeTvdbId))
|
if (string.IsNullOrEmpty(episodeTvdbId))
|
||||||
{
|
{
|
||||||
_logger.LogError(
|
_logger.LogError(
|
||||||
"Episode {SeasonNumber}x{EpisodeNumber} not found for series {SeriesTvdbId}",
|
"Episode {SeasonNumber}x{EpisodeNumber} not found for series {SeriesTvdbId}",
|
||||||
episodeInfo.ParentIndexNumber,
|
episode.ParentIndexNumber,
|
||||||
episodeInfo.IndexNumber,
|
episode.IndexNumber,
|
||||||
series.GetProviderId(MetadataProvider.Tvdb));
|
series.GetProviderId(MetadataProvider.Tvdb));
|
||||||
return imageResult;
|
return imageResult;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user