ShokoAnime / Shokofin

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

Unhandled Exception #70

Closed t0815 closed 3 months ago

t0815 commented 3 months ago

Jellyfin version.

10.9.9

Shokofin version.

4.1.1.0

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.

./AnimeXYZ/episode.xxx

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

An unhandled exception occurs during import/scan and stops scan after occuring

Stack Trace

[2024-08-17 11:41:57.032 +02:00] [ERR] [21] Shokofin.Resolvers.ShokoIgnoreRule: Threw unexpectedly; "Sequence contains no matching element"
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at Shokofin.API.ShokoAPIManager.<>c__DisplayClass32_0.<<GetPathSetAndLocalEpisodeIdsForSeries>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Shokofin.Utils.GuardedMemoryCache.GetOrCreateAsync[TItem](Object key, Func`1 createFactory, MemoryCacheEntryOptions createOptions)
   at Shokofin.API.ShokoAPIManager.GetPathSetForSeries(String seriesId, IEnumerable`1 extraIds)
   at Shokofin.API.ShokoAPIManager.GetSeriesIdForPath(String path)
   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-17 11:41:57.044 +02:00] [ERR] [14] MediaBrowser.Controller.Entities.BaseItem: Error retrieving children
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at Shokofin.API.ShokoAPIManager.<>c__DisplayClass32_0.<<GetPathSetAndLocalEpisodeIdsForSeries>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Shokofin.Utils.GuardedMemoryCache.GetOrCreateAsync[TItem](Object key, Func`1 createFactory, MemoryCacheEntryOptions createOptions)
   at Shokofin.API.ShokoAPIManager.GetPathSetForSeries(String seriesId, IEnumerable`1 extraIds)
   at Shokofin.API.ShokoAPIManager.GetSeriesIdForPath(String path)
   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 System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   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

Fixed on the dev channel. The fix will hit the stable channel in the next stable release.