소스 검색

Fix ArgumentOutOfRangeException scanning AudioBooks

AudioResolver.ResolveMultipleAudio method can attempt to access the first item in a List without checking if the list is empty which throws an ArgumentOutOfRangeException and stops the 'Scan Library' process.
Stephen Moore 4 년 전
부모
커밋
e841922ffd
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs

+ 5 - 0
Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs

@@ -201,6 +201,11 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
                     continue;
                 }
 
+                if (resolvedItem.Files.Count == 0)
+                {
+                    continue;
+                }
+
                 var firstMedia = resolvedItem.Files[0];
 
                 var libraryItem = new T