Skip to content

[Issue]: Jellyfin looks to the wrong path #7576

Closed
@Germs2004

Description

Please describe your bug

During installation on Windows 11, I chose to install as a Windows Service and run as Network Service. I set my data path to D:\Jellyfin, and most things work fine. But Jellyfin still looks at C:\ProgramData\Jellyfin for some things, which causes errors and causes the "Scan Media Library" button to always fail immediately. I can't find anything in my config that points to ProgramData, so I think this may be a bug in the code where it is hard coded to use ProgramData.

In the log, attached, you see Jellyfin tries to read from C:\ProgramData\Jellyfin\Server\root\default\Movies but the correct path should be D:\Jellyfin\root\default\Movies

I tried to track down the bug and got as far as MediaBrowser.Controller.Entities.CollectionFolder.CreateResolveArgs()
In that function, the first line says
var path = ContainingFolderPath;
That "ContainingFolderPath" variable points to C:\ProgramData. If someone can trace that back to figure out why it's finding C:\ProgramData instead of my D:\Jellyfin, I bet that will solve the bug.

A similar, cosmetic bug is that Jellyfin creates C:\ProgramData\Jellyfin\Server\transcodes\ every time it starts up instead of using D:\Jellyfin\transcodes.

I saw another user had the problem but they never found a proper fix: #7464

Jellyfin Version

10.8.0

if other:

No response

Environment

- OS: Windows 11
- Virtualization: no
- Browser: Chrome

Jellyfin logs

[2022-04-09 22:32:03.452 -04:00] [ERR] [15] MediaBrowser.Controller.Entities.BaseItem: Error refreshing owned items for "C:\ProgramData\Jellyfin\Server\root\default\Movies"
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\Jellyfin\Server\root\default\Movies'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
   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 System.IO.DirectoryInfo.EnumerateFileSystemInfos(String searchPattern, EnumerationOptions enumerationOptions)
   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.ConcurrentDictionary`2.GetOrAdd[TArg](TKey key, Func`3 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)

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions