ShokoAnime / Shokofin

Repository for Shokofin, a plugin that brings Shoko to Jellyfin.
https://shokoanime.com
MIT License
149 stars 18 forks source link

Unhandled Exception v2 (dev) #72

Closed t0815 closed 3 months ago

t0815 commented 3 months ago

Jellyfin version.

10.9.9

Shokofin version.

4.1.1.20 (dev)

Shoko Server version, release channel, and commit hash.

4.2.2

File structure of your Media Library Folder in Jellyfin/Import Folder in Shoko Server.

./Anime/Ep.x

Screenshot of the "library settings" section of the plugin settings.

grafik

Library Type(s).

Shows

Do the issue persists after creating a library with Shoko set as the only metadata provider? (Now is your time to check if you haven't already.)

Issue

different type of unhandled exception during scan. Breaks import too.

Stack Trace

[2024-08-19 07:46:20.270 +02:00] [INF] [8] Shokofin.Resolvers.ShokoIgnoreRule: Found shoko group "69: Itsuwari no Bishou" (Series="4291",ExtraSeries=[],Group="3453")
[2024-08-19 07:46:20.431 +02:00] [ERR] [8] Shokofin.Resolvers.ShokoIgnoreRule: Threw unexpectedly; "Non-negative number required. (Parameter 'index')"
System.ArgumentOutOfRangeException: Non-negative number required. (Parameter 'index')
   at System.Collections.Generic.List`1.GetRange(Int32 index, Int32 count)
   at Shokofin.API.Info.SeasonInfo..ctor(Series series, Nullable`1 customType, IEnumerable`1 extraIds, Nullable`1 earliestImportedAt, Nullable`1 lastImportedAt, List`1 episodes, List`1 cast, List`1 relations, String[] genres, String[] tags, String[] productionLocations, String contentRating)
   at Shokofin.API.ShokoAPIManager.<>c__DisplayClass48_0.<<CreateSeasonInfo>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Shokofin.Utils.GuardedMemoryCache.GetOrCreateAsync[TItem](Object key, Action`1 foundAction, Func`1 createFactory, MemoryCacheEntryOptions createOptions)
   at Shokofin.API.ShokoAPIManager.CreateSeasonInfo(Series series)
   at Shokofin.API.ShokoAPIManager.GetSeasonInfoByPath(String path)
   at Shokofin.Resolvers.ShokoIgnoreRule.ShouldFilterDirectory(String partialPath, String fullPath, Nullable`1 collectionType, Boolean shouldIgnore)
   at Shokofin.Resolvers.ShokoIgnoreRule.ShouldFilterItem(Folder parent, FileSystemMetadata fileInfo)
[2024-08-19 07:46:20.445 +02:00] [ERR] [20] MediaBrowser.Controller.Entities.BaseItem: Error retrieving children
System.ArgumentOutOfRangeException: Non-negative number required. (Parameter 'index')
   at System.Collections.Generic.List`1.GetRange(Int32 index, Int32 count)
   at Shokofin.API.Info.SeasonInfo..ctor(Series series, Nullable`1 customType, IEnumerable`1 extraIds, Nullable`1 earliestImportedAt, Nullable`1 lastImportedAt, List`1 episodes, List`1 cast, List`1 relations, String[] genres, String[] tags, String[] productionLocations, String contentRating)
   at Shokofin.API.ShokoAPIManager.<>c__DisplayClass48_0.<<CreateSeasonInfo>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Shokofin.Utils.GuardedMemoryCache.GetOrCreateAsync[TItem](Object key, Action`1 foundAction, Func`1 createFactory, MemoryCacheEntryOptions createOptions)
   at Shokofin.API.ShokoAPIManager.CreateSeasonInfo(Series series)
   at Shokofin.API.ShokoAPIManager.GetSeasonInfoByPath(String path)
   at Shokofin.Resolvers.ShokoIgnoreRule.ShouldFilterDirectory(String partialPath, String fullPath, Nullable`1 collectionType, Boolean shouldIgnore)
   at Shokofin.Resolvers.ShokoIgnoreRule.ShouldFilterItem(Folder parent, FileSystemMetadata fileInfo)
   at Shokofin.Resolvers.ShokoIgnoreRule.MediaBrowser.Controller.Resolvers.IResolverIgnoreRule.ShouldIgnore(FileSystemMetadata fileInfo, BaseItem parent)
   at Emby.Server.Implementations.Library.LibraryManager.<>c__DisplayClass83_0.<IgnoreFile>b__0(IResolverIgnoreRule r)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Emby.Server.Implementations.Library.LibraryManager.IgnoreFile(FileSystemMetadata file, BaseItem parent)
   at Emby.Server.Implementations.Library.LibraryManager.<>c__DisplayClass87_0.<ResolvePaths>b__0(FileSystemMetadata i)
   at System.Linq.Enumerable.WhereArrayIterator`1.ToList()
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePaths(IEnumerable`1 files, IDirectoryService directoryService, Folder parent, LibraryOptions libraryOptions, Nullable`1 collectionType, IItemResolver[] resolvers)
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePaths(IEnumerable`1 files, IDirectoryService directoryService, Folder parent, LibraryOptions libraryOptions, Nullable`1 collectionType)
   at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
revam commented 3 months ago

i checked the wrong vaiable last night. I'll fix it later today.