Fix ArgumentNullException when downloading season logos (#14141)

This commit is contained in:
theguymadmax 2025-05-20 08:03:04 -04:00 committed by GitHub
parent 8339111732
commit a6a89f7953
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -483,6 +483,22 @@ namespace MediaBrowser.Providers.Manager
}
}
if (type == ImageType.Logo && saveLocally)
{
if (season is not null && season.IndexNumber.HasValue)
{
var seriesFolder = season.SeriesPath;
var seasonMarker = season.IndexNumber.Value == 0
? "-specials"
: season.IndexNumber.Value.ToString("00", CultureInfo.InvariantCulture);
var imageFilename = "season" + seasonMarker + "-logo" + extension;
return Path.Combine(seriesFolder, imageFilename);
}
}
string filename;
var folderName = item is MusicAlbum ||
item is MusicArtist ||