Jellyfin Forum
Library Scan Fails 10.9.0 - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Server Development (https://forum.jellyfin.org/f-server-development)
+--- Thread: Library Scan Fails 10.9.0 (/t-library-scan-fails-10-9-0)



Library Scan Fails 10.9.0 - lechevaliernoir - 2024-03-28

Build version: jellyfin-server_2024032505+deb12_amd64.deb
Unstable, upgraded from 10.8.3

I created a library, "Shows2", then went to the dashboard and removed it. After removing it, it still is displayed under "My Media" on the home page. Additionally, library scans are now failing with the log info listed below. I have been looking through the library.db to find where this is saved in order to remove reference to it, but am unable to find the pertinent information. Any ideas how I can remove these? 

[2024-03-28 08:36:33.473 -09:00] [INF] Validating media library
[2024-03-28 08:36:33.611 -09:00] [WRN] Library folder "/var/lib/jellyfin/data/playlists" is inaccessible or empty, skipping
[2024-03-28 08:36:33.651 -09:00] [ERR] Error refreshing owned items for "/var/lib/jellyfin/root/default/Shows2"
System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/lib/jellyfin/root/default/Shows2'.
  at System.IO.Enumeration.FileSystemEnumerator1.Init()
  at System.IO.Enumeration.FileSystemEnumerable
1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
  at System.IO.Enumeration.FileSystemEnumerableFactory.FileSystemInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
  at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
  at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive)
  at MediaBrowser.Controller.Providers.DirectoryService.<>c.<GetFileSystemEntries>b__5_0(String p, IFileSystem fileSystem)
  at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd[TArg](TKey key, Func3 valueFactory, TArg factoryArgument)
  at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path)
  at MediaBrowser.Controller.IO.FileData.GetFilteredFileSystemEntries(IDirectoryService directoryService, String path, IFileSystem fileSystem, IServerApplicationHost appHost, ILogger logger, ItemResolveArgs args, Int32 flattenFolderDepth, Boolean resolveShortcuts)
  at MediaBrowser.Controller.Entities.CollectionFolder.CreateResolveArgs(IDirectoryService directoryService, Boolean setPhysicalLocations)
  at MediaBrowser.Controller.Entities.CollectionFolder.GetFileSystemChildren(IDirectoryService directoryService)
  at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
[2024-03-28 08:36:33.653 -09:00] [ERR] Error executing Scheduled Task
System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/lib/jellyfin/root/default/Shows2'.
  at System.IO.Enumeration.FileSystemEnumerator1.Init()
  at System.IO.Enumeration.FileSystemEnumerable
1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
  at System.IO.Enumeration.FileSystemEnumerableFactory.FileSystemInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
  at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
  at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive)
  at MediaBrowser.Controller.Providers.DirectoryService.<>c.<GetFileSystemEntries>b__5_0(String p, IFileSystem fileSystem)
  at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd[TArg](TKey key, Func3 valueFactory, TArg factoryArgument)
  at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path)
  at MediaBrowser.Controller.IO.FileData.GetFilteredFileSystemEntries(IDirectoryService directoryService, String path, IFileSystem fileSystem, IServerApplicationHost appHost, ILogger logger, ItemResolveArgs args, Int32 flattenFolderDepth, Boolean resolveShortcuts)
  at MediaBrowser.Controller.Entities.CollectionFolder.CreateResolveArgs(IDirectoryService directoryService, Boolean setPhysicalLocations)
  at MediaBrowser.Controller.Entities.CollectionFolder.RequiresRefresh()
  at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken


RE: Library Scan Fails 10.9.0 - TheDreadPirate - 2024-03-28

Stop jellyfin and go to /var/lib/jellyfin/root/default/ and delete the "Shows2" folder in there.


RE: Library Scan Fails 10.9.0 - lechevaliernoir - 2024-03-28

I actually did check that directory. After removing the library from Administration>Dashboard>Libraries, the folder has disappeared from /var/lib/jellyfin/root/default/ but still shows up under "My Media" on the homepage and as a folder under Administration>Metadata. That's why I started looking through database files and figured it was worth reporting.

Edit: Also, I do appreciate your prompt review and reply!


RE: Library Scan Fails 10.9.0 - TheDreadPirate - 2024-03-28

AFAIK, /var/lib/jellyfin/root/default/ is where JF stores folders that represent libraries. If it didn't clean up the DB that is definitely a reportable issue.

https://github.com/jellyfin/jellyfin/issues

I don't see one that sounds like yours. Provide as much information and logs as you can.


RE: Library Scan Fails 10.9.0 - 素兮若雪 - 2024-04-05

(2024-03-28, 11:59 PM)TheDreadPirate Wrote: AFAIK, /var/lib/jellyfin/root/default/ is where JF stores folders that represent libraries.  If it didn't clean up the DB that is definitely a reportable issue.

https://github.com/jellyfin/jellyfin/issues

I don't see one that sounds like yours.  Provide as much information and logs as you can.

I also encountered it on 10.9.0, and 100% triggered a bug, so I can no longer scan the repository. You can try renaming any media library. This bug is 100% triggered. Please prepare for testing as the database will be damaged and unable to scan media. Optimizing the database is invalid.
The corresponding repository configuration file will not be created under the directory where media configuration is stored, such as/configure/root/default