浏览代码

Merge pull request #7845 from utkuozdemir/fix/photos-lib-dir-with-single-video

Cody Robibero 2 年之前
父节点
当前提交
8ba83e41ae
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 1 0
      CONTRIBUTORS.md
  2. 3 1
      Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs

+ 1 - 0
CONTRIBUTORS.md

@@ -225,3 +225,4 @@
  - [gnuyent](https://github.com/gnuyent)
  - [Matthew Jones](https://github.com/matthew-jones-uk)
  - [Jakob Kukla](https://github.com/jakobkukla)
+ - [Utku Özdemir](https://github.com/utkuozdemir)

+ 3 - 1
Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs

@@ -464,7 +464,9 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
             var result = ResolveVideos<T>(parent, fileSystemEntries, SupportsMultiVersion, collectionType, parseName) ??
                 new MultiItemResolverResult();
 
-            if (result.Items.Count == 1)
+            var isPhotosCollection = string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase)
+                                         || string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase);
+            if (!isPhotosCollection && result.Items.Count == 1)
             {
                 var videoPath = result.Items[0].Path;
                 var hasPhotos = photos.Any(i => !PhotoResolver.IsOwnedByResolvedMedia(videoPath, i.Name));