• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Media Scanning & Identification DB Entries Not Purged After Folder Change

     
    • 0 Vote(s) - 0 Average

    DB Entries Not Purged After Folder Change

    Duplicate DB entries to non existent file paths not removed after changing library folder locations
    Unstaffed8755
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    #1
    2024-07-07, 02:14 AM
    I have been having some difficulty with MergeVersions which I linked back to a problem with library.db.  Due to some mounting problems, my default folder path for my Movie and TV directories had changed, so I updated the respective folders for each library to the new mount location (we'll call the move /media1/ -> /media2/ for reference), making sure to remove the old folder in the process.  However once MergeVersions ran, it created duplicate entries for every single file (so a file with 2 versions now had 4 versions, 2 pointing to an invalid location).  So I split the versions again and uninstalled MergeVersions, and the duplicates went away.

    After that I did a full rescan on each library (using replace all metadata), cleared the cache, and optimized the db.  Reinstalled MergeVersions again, and the same thing happens.  I ended up opening library.db in DB Browser which MergeVersions was calling from, and found all of the original entries pointing to /media1/ in addition to /media2/.  So while the nonexistent old files do not appear in Jellyfin, they clearly still exist within library.db in addition to the new ones, and MergeVersions is using library.db to determine which files have multiple versions.

    It's worth mentioning I've run all scheduled tasks and done the full scan on every library, and it still doesn't clean up those nonexistent entries in library.db.  For reference I am running Jellyfin 10.9.7 debian build.  How can I clean up these entries so that MergeVersions and other plugins will not create duplicates referencing the old nonexistent path?  I'd rather not have to edit these entries manually in DB Browser out of fear of screwing something up.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-07-07, 01:51 PM
    Try running the Optimize Database scheduled task manually. The code doesn't explicitly say what it does, but perhaps it will clear out those entries.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Unstaffed8755
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    #3
    2024-07-07, 06:58 PM
    Thanks so much for getting back to me. Unfortunately I've tried the Optimize Database task about 6 or 7 times so far, but unfortunately it didn't help. Is there possibly some way to purge the database and then rebuild it?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-07-08, 02:23 AM
    I wonder if a "replace all metadata" scan will accomplish a purge. Otherwise you can try backing up your entire database and metadata directory (while jellyfin isn't running), rename the metadata directory, start jellyfin and see what happens.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    bijon
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2024 Jul
    Reputation: 0
    #5
    2024-07-25, 07:26 PM (This post was last modified: 2024-07-25, 07:27 PM by bijon. Edited 1 time in total.)
    Do you have an update to this? I have a similar issue. I changed Library paths and now the library.db has duplicate entries for all items: one with the old path and one with the new. I'm assuming blowing away the metadata directory takes any manual edits with it? If so, I'd like to avoid that. I've taken similar steps to the OP but nothing seems to purge those records.

    Edit: wrong word
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode