aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library
diff options
context:
space:
mode:
authorLmanTW <lmantw2009@gmail.com>2026-04-10 18:59:59 +0800
committerLmanTW <lmantw2009@gmail.com>2026-04-10 18:59:59 +0800
commit3ef7ada736971fa6a18156568c9cebc619c78483 (patch)
tree28a9f3de6e2793ed85f0b53752843561d79769c5 /Emby.Server.Implementations/Library
parenteacdc83fda01b712d2f9821e6624449304395486 (diff)
Ignore season directories with no video for TV Shows
Diffstat (limited to 'Emby.Server.Implementations/Library')
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs
index 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 disable
using 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.TV
return 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))