Unable to switch a library folder without loosing all the discovered medias #7727

Open
opened 2026-02-07 05:21:43 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Byh0ki on GitHub (Nov 10, 2025).

Description of the bug

Hello and thanks a lot for the project.

A few months ago, I've tried to switch/update my folders/volumes setup on my Jellyfin (installed with Docker) instance. The plan was simply to map the host_path to a new location in the container and simply switch the Folders in the Library settings. To my surprise, the actual behavior was to remove all the element from the library and then the auto-discovery was stuck on a non-existing movie that was somehow parsed as a TV show. (I also had a similar issue with a TV shows only library).

Globally, I don't have issues during JF updates (migration to 10.11.x was almost instant). I can add new media to the library and they'll get picked up without any issues. I can even rescan an existing library without any issues.

I've tried on multiple Jellyfin version in 10.10.x and also with 10.11.2.

Here are the setups I tried:

  • start from a new instance -> no issue (either 10.10.7 or 10.11.2)
  • setup a new library with the new path:
    • 10.10.7: The library is not populated and the logs contain a strange message referring to a tv show (it should be only movies) that is not in the folder (log 1)
    • 10.11.2 -> encounter a "The library is in an invalid state and cannot be edited. You are possibly encountering a bug: the path in the database is not the correct path on the filesystem." error and the library won't scan. Nothing in the logs.
  • setup a new library on 10.10.7, update to 10.11.2 and force a rescan -> same behavior as in 10.10.7
  • add an extra folder on the library pointing to effectively the same host_path (but different container paths) -> no change at first, if I then remove the "old" path -> similar issue as in Log 1, library is now empty and the movies seems to be parsed as TV shows (log 2)

It would be a quite problematic to have to reset the instance as I would lose the local user accounts and their watch status. If there is a way to reset and re-import the user from a Backup, that might be a good solution but not sure it is yet available, even in 10.11.x :/

Reproduction steps

  1. Setup a library with a given path
  2. Switch to a new path pointing to the same actual directory on the host
  3. Library is now empty

What is the current bug behavior?

Unable to update the libraries settings without rendering it useless.

What is the expected correct behavior?

Able to update the libraries settings without rendering it useless.

Jellyfin Server version

10.11.0+

Specify version number

10.11.2

Specify the build version

10.11.2

Environment

- OS: Debian
- Linux Kernel: 6.12.x
- Virtualization: Docker
- Clients: Browser / Android Phone and TV
- Plugins: Playback report, reports
- Jellyfin Data Storage: SSD
- Media Storage: HDD

Jellyfin logs

Log 1:

[20:38:53] [INF] [53] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting /usr/lib/jellyfin-ffmpeg/ffprobe with args -analyzeduration 200M -probesize 1G -i file:"/media/movies/Harry Potter and the Prisoner of Azkaban (2004)/Harry Potter and the Prisoner of Azkaban (2004) Bluray-2160p.mkv" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format
jellyfin-dev  | [20:38:53] [ERR] [18] Jellyfin.Plugin.Tvdb.Providers.TvdbEpisodeImageProvider: Episode nullxnull not found for series 395465:The Life and Movies of Ersan Kuneri


Log 2:

[22:26:31] [ERR] [7] Jellyfin.Plugin.Tvdb.Providers.TvdbEpisodeProvider: Episode SnullEnull not found for series 0:Black Panther
Originally created by @Byh0ki on GitHub (Nov 10, 2025). ### Description of the bug Hello and thanks a lot for the project. A few months ago, I've tried to switch/update my folders/volumes setup on my Jellyfin (installed with Docker) instance. The plan was simply to map the host_path to a new location in the container and simply switch the Folders in the Library settings. To my surprise, the actual behavior was to remove all the element from the library and then the auto-discovery was stuck on a non-existing movie that was somehow parsed as a TV show. (I also had a similar issue with a TV shows only library). Globally, I don't have issues during JF updates (migration to 10.11.x was almost instant). I can add new media to the library and they'll get picked up without any issues. I can even rescan an existing library without any issues. I've tried on multiple Jellyfin version in 10.10.x and also with 10.11.2. Here are the setups I tried: - start from a new instance -> no issue (either 10.10.7 or 10.11.2) - setup a new library with the new path: - 10.10.7: The library is not populated and the logs contain a strange message referring to a tv show (it should be only movies) that is not in the folder (log 1) - 10.11.2 -> encounter a "The library is in an invalid state and cannot be edited. You are possibly encountering a bug: the path in the database is not the correct path on the filesystem." error and the library won't scan. Nothing in the logs. - setup a new library on 10.10.7, update to 10.11.2 and force a rescan -> same behavior as in 10.10.7 - add an extra folder on the library pointing to effectively the same host_path (but different container paths) -> no change at first, if I then remove the "old" path -> similar issue as in `Log 1`, library is now empty and the movies seems to be parsed as TV shows (log 2) It would be a quite problematic to have to reset the instance as I would lose the local user accounts and their watch status. If there is a way to reset and re-import the user from a Backup, that might be a good solution but not sure it is yet available, even in 10.11.x :/ ### Reproduction steps 1. Setup a library with a given path 2. Switch to a new path pointing to the same actual directory on the host 3. Library is now empty ### What is the current _bug_ behavior? Unable to update the libraries settings without rendering it useless. ### What is the expected _correct_ behavior? Able to update the libraries settings without rendering it useless. ### Jellyfin Server version 10.11.0+ ### Specify version number 10.11.2 ### Specify the build version 10.11.2 ### Environment ```markdown - OS: Debian - Linux Kernel: 6.12.x - Virtualization: Docker - Clients: Browser / Android Phone and TV - Plugins: Playback report, reports - Jellyfin Data Storage: SSD - Media Storage: HDD ``` ### Jellyfin logs ```shell Log 1: [20:38:53] [INF] [53] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting /usr/lib/jellyfin-ffmpeg/ffprobe with args -analyzeduration 200M -probesize 1G -i file:"/media/movies/Harry Potter and the Prisoner of Azkaban (2004)/Harry Potter and the Prisoner of Azkaban (2004) Bluray-2160p.mkv" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format jellyfin-dev | [20:38:53] [ERR] [18] Jellyfin.Plugin.Tvdb.Providers.TvdbEpisodeImageProvider: Episode nullxnull not found for series 395465:The Life and Movies of Ersan Kuneri Log 2: [22:26:31] [ERR] [7] Jellyfin.Plugin.Tvdb.Providers.TvdbEpisodeProvider: Episode SnullEnull not found for series 0:Black Panther ```
OVERLORD added the bug label 2026-02-07 05:21:43 +03:00
Author
Owner

@Cody-Howell commented on GitHub (Nov 19, 2025):

We've been able to recreate this once. I then pulled the latest version of Jellyfin and Jellyfin Web (just a few weeks out of date), and have been unable to reproduce it since.
But I did see it happen. Before I updated, I broke the directory I was calling on that library and on any future libraries that were created with that file path (as in, I created a new library with the old path and it was still empty). I was still able to specify a sub-directory and see the data within that, but that's all I've seen.

This was just tested in a local Windows run, so I'm not discounting that it happens in Docker.

@Cody-Howell commented on GitHub (Nov 19, 2025): We've been able to recreate this once. I then pulled the latest version of Jellyfin and Jellyfin Web (just a few weeks out of date), and have been unable to reproduce it since. But I did see it happen. Before I updated, I broke the directory I was calling on that library and on any future libraries that were created with that file path (as in, I created a new library with the old path and it was still empty). I was still able to specify a sub-directory and see the data within that, but that's all I've seen. This was just tested in a local Windows run, so I'm not discounting that it happens in Docker.
Author
Owner

@Byh0ki commented on GitHub (Dec 9, 2025):

Oh, nice to see that I'm not alone with this 😅 What would be a good course of action to resolve the issue? I'm available if you need additional logs/test some stuff!

If we don't find anything, what could I do to backup my users (and their watched content) and restore that on a fresh install?

@Byh0ki commented on GitHub (Dec 9, 2025): Oh, nice to see that I'm not alone with this 😅 What would be a good course of action to resolve the issue? I'm available if you need additional logs/test some stuff! If we don't find anything, what could I do to backup my users (and their watched content) and restore that on a fresh install?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#7727