The Free Software Media System - Server Backend & API
Ignore season directories with no video for TV Shows
LmanTW3ef7ada73697
diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.csindex 6cb63a28a2..d4e8e0a63a 100644--- a/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs@@ -1,6 +1,8 @@#nullable disableusing System.Globalization;+using System.IO;+using System.Linq;using Emby.Naming.Common;using Emby.Naming.TV;using MediaBrowser.Controller.Entities.TV;@@ -77,6 +79,14 @@ namespace Emby.Server.Implementations.Library.Resolvers.TVreturn null;}++ var hasAnyVideo = Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories)+ .Any(file => _namingOptions.VideoFileExtensions.Contains(Path.GetExtension(file)));++ if (!hasAnyVideo)+ {+ return null;+ }}if (season.IndexNumber.HasValue && string.IsNullOrEmpty(season.Name))