# Summary: Linux Paths Showing on Windows ## โœ… Root Cause Identified Your database is **correctly** storing virtual paths: ``` %MetadataPath%\People\D\David L.M. McIntyre\folder.jpg ``` However, the logs show Linux paths: ``` /var/lib/jellyfin/metadata/People/D/David L.M. McIntyre/folder.jpg ``` **Why?** The `system.xml` configuration file contains Linux paths that are used to expand the virtual `%MetadataPath%` placeholder. ## ๐Ÿ“‚ Files to Check ### **1. system.xml** (Most likely culprit) **Location:** `C:\ProgramData\jellyfin\config\system.xml` Look for: ```xml /var/lib/jellyfin/metadata ``` Should be: ```xml ``` or ```xml C:\ProgramData\jellyfin\data\metadata ``` ### **2. encoding.xml** (If transcoding shows Linux paths) **Location:** `C:\ProgramData\jellyfin\config\encoding.xml` Look for: ```xml /var/tmp/jellyfin ``` Should be empty or a Windows path. ### **3. database.xml** (Less common) **Location:** `C:\ProgramData\jellyfin\config\database.xml` Check for any Linux paths in connection strings or options. ## ๐Ÿ”ง How to Fix ### **Option 1: Use PowerShell Script** (Automated - Recommended) ```powershell # Check what needs to be fixed (safe, no changes) .\FixJellyfinPaths.ps1 -DryRun # Apply fixes (with confirmation prompt) .\FixJellyfinPaths.ps1 # Apply fixes without prompts .\FixJellyfinPaths.ps1 -Force # Custom paths .\FixJellyfinPaths.ps1 -ConfigPath "D:\Jellyfin\config" -DataPath "D:\Jellyfin\data" ``` ### **Option 2: Edit system.xml Manually** 1. **Stop Jellyfin** 2. Open `C:\ProgramData\jellyfin\config\system.xml` 3. Find `` and change from Linux path to empty or Windows path 4. Save 5. **Start Jellyfin** ### **Option 3: Via Dashboard** (UI) 1. Dashboard โ†’ Advanced โ†’ Paths 2. Clear or update the **Metadata path** field 3. Save 4. Restart Jellyfin ## ๐Ÿงช How the Path Resolution Works ``` Database Stores: %MetadataPath%\People\D\David L.M. McIntyre\folder.jpg โ†“ (Expand virtual path) โ†“ system.xml has: /var/lib/jellyfin/metadata โ† PROBLEM! โ†“ (Combine paths) โ†“ Final Path: /var/lib/jellyfin/metadata\People\D\David L.M. McIntyre\folder.jpg ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (Linux path from config!) ``` **After Fix:** ``` Database Stores: %MetadataPath%\People\D\David L.M. McIntyre\folder.jpg โ†“ (Expand virtual path) โ†“ system.xml has: (empty) โ†’ Use default: C:\ProgramData\jellyfin\data\metadata โ†“ (Combine paths) โ†“ Final Path: C:\ProgramData\jellyfin\data\metadata\People\D\David L.M. McIntyre\folder.jpg โœ“ Correct Windows path! ``` ## ๐Ÿ“ Code Locations The path expansion happens in: 1. **`ServerConfigurationManager.cs:78-84`** ```csharp private void UpdateMetadataPath() { ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = string.IsNullOrWhiteSpace(Configuration.MetadataPath) ? ApplicationPaths.DefaultInternalMetadataPath : Configuration.MetadataPath; // โ† Uses system.xml value } ``` 2. **`ServerApplicationPaths.cs:63`** ```csharp public string PeoplePath => Path.Combine(InternalMetadataPath, "People"); ``` ## ๐Ÿ” Verification After applying the fix, check the logs. The error should change from: ``` [WRN] Image not found at "/var/lib/jellyfin/metadata/People/..." ``` To: ``` [WRN] Image not found at "C:\ProgramData\jellyfin\data\metadata\People\..." ``` (The file might still not exist, but at least the path will be correct!) ## ๐Ÿ“ Prevention When migrating from Linux to Windows in the future: 1. Don't copy `system.xml` directly 2. Let Jellyfin generate a new config file 3. Or manually edit paths before starting Jellyfin 4. Use empty values for paths to let Jellyfin use OS-appropriate defaults ## ๐ŸŽฏ TL;DR - โœ… Database is correct (uses `%MetadataPath%`) - โŒ `system.xml` has Linux paths - ๐Ÿ”ง Fix: Clear `` in system.xml - ๐Ÿ”„ Restart Jellyfin