Fix type check

This commit is contained in:
cvium 2021-04-09 13:28:27 +02:00
parent 08ccf2a49c
commit e7fc18d0f3

View File

@ -2531,7 +2531,7 @@ namespace Emby.Server.Implementations.Library
{ {
episodeInfo = resolver.Resolve(episode.Path, isFolder, null, null, isAbsoluteNaming) ?? new EpisodeInfo(episode.Path); episodeInfo = resolver.Resolve(episode.Path, isFolder, null, null, isAbsoluteNaming) ?? new EpisodeInfo(episode.Path);
// Resolve from parent folder if it's not the Season folder // Resolve from parent folder if it's not the Season folder
if (!episodeInfo.EpisodeNumber.HasValue && episode.Parent is not Season) if (!episodeInfo.EpisodeNumber.HasValue && episode.Parent.GetType() == typeof(Folder))
{ {
var episodeInfoFromFolder = resolver.Resolve(Path.GetDirectoryName(episode.Path)!, true, null, null, isAbsoluteNaming); var episodeInfoFromFolder = resolver.Resolve(Path.GetDirectoryName(episode.Path)!, true, null, null, isAbsoluteNaming);
// merge the missing information // merge the missing information