mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	fix: single video folder during photos lib scan
Prevent a directory with a single video file to be detected as a movie directory when the library type is "Photos". Closes jellyfin/jellyfin#7825 Signed-off-by: Utku Ozdemir <uoz@protonmail.com>
This commit is contained in:
		
							parent
							
								
									2c9b24a1e7
								
							
						
					
					
						commit
						9ec42f8cf5
					
				@ -464,7 +464,9 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
 | 
				
			|||||||
            var result = ResolveVideos<T>(parent, fileSystemEntries, SupportsMultiVersion, collectionType, parseName) ??
 | 
					            var result = ResolveVideos<T>(parent, fileSystemEntries, SupportsMultiVersion, collectionType, parseName) ??
 | 
				
			||||||
                new MultiItemResolverResult();
 | 
					                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 videoPath = result.Items[0].Path;
 | 
				
			||||||
                var hasPhotos = photos.Any(i => !PhotoResolver.IsOwnedByResolvedMedia(videoPath, i.Name));
 | 
					                var hasPhotos = photos.Any(i => !PhotoResolver.IsOwnedByResolvedMedia(videoPath, i.Name));
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user