[Issue]: Possible clue/root cause to "Can't add films with multiple versions to collections" #5996

Closed
opened 2026-02-07 02:49:14 +03:00 by OVERLORD · 13 comments
Owner

Originally created by @brunoherrera on GitHub (Jun 12, 2024).

Please describe your bug

Basically this: #11736

Possible lead:

I think the issue is related to nfo files, because the movie with multiple versions gets a 'movie.nfo' and only one 'mofieFileNameHere.nfo', when that movie is added to a collection, the [boxset] collection.xml references a <Path> to a movie version that doesn't have a 'mofieFileNameHere.nfo' generated, as soon as you edit collection.xml and change the path of the problematic movie to the one that actually has a mofieFileNameHere.nfo generated, and refresh metadata for the collection it shows up, though it will not show up with all the versions of the movies and will only display the version that has the mofieFileNameHere.nfo generated

Reproduction Steps

  1. Add a film with multiple versions to a film library
  2. Add that film to a collection
  3. Check if it appears in the collection

Jellyfin Version

10.9.0

if other:

No response

Environment

- OS: Windows 10
- Linux Kernel: /
- Virtualization: /
- Clients: Jellyfin Web
- Browser: Chrome
- FFmpeg Version: 2023-09-07-git-9c9f48e7f2-full_build-www.gyan.dev
- Playback Method: /
- Hardware Acceleration: yes
- GPU Model: Evga FTW3 Black RTX 3090 TI
- Plugins: AudioDB, MusicBrainz, OMDb, Open Subtitles, Reports, Studio Images, TMDb, TMDb Trailers, Webhook, YoutubeMetadata
- Reverse Proxy: /
- Base URL: /
- Networking: /
- Storage: /

Jellyfin logs

nothing relevant

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
Originally created by @brunoherrera on GitHub (Jun 12, 2024). ### Please describe your bug Basically this: #11736 Possible lead: I think the issue is related to nfo files, because the movie with multiple versions gets a 'movie.nfo' **and only one** 'mofieFileNameHere.nfo', when that movie is added to a collection, the [boxset] collection.xml references a `<Path>` to a movie version that doesn't have a 'mofieFileNameHere.nfo' generated, as soon as you edit collection.xml and change the path of the problematic movie to the one that actually has a mofieFileNameHere.nfo generated, and refresh metadata for the collection it shows up, though it will not show up with all the versions of the movies and will only display the version that has the mofieFileNameHere.nfo generated ### Reproduction Steps 1. Add a film with multiple versions to a film library 2. Add that film to a collection 3. Check if it appears in the collection ### Jellyfin Version 10.9.0 ### if other: _No response_ ### Environment ```markdown - OS: Windows 10 - Linux Kernel: / - Virtualization: / - Clients: Jellyfin Web - Browser: Chrome - FFmpeg Version: 2023-09-07-git-9c9f48e7f2-full_build-www.gyan.dev - Playback Method: / - Hardware Acceleration: yes - GPU Model: Evga FTW3 Black RTX 3090 TI - Plugins: AudioDB, MusicBrainz, OMDb, Open Subtitles, Reports, Studio Images, TMDb, TMDb Trailers, Webhook, YoutubeMetadata - Reverse Proxy: / - Base URL: / - Networking: / - Storage: / ``` ### Jellyfin logs ```shell nothing relevant ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 02:49:14 +03:00
Author
Owner

@Shadowghost commented on GitHub (Jun 12, 2024):

Are your NFOs generated by Jellyfin? If yes, we should only use movie.nfo as fallback.

@Shadowghost commented on GitHub (Jun 12, 2024): Are your NFOs generated by Jellyfin? If yes, we should only use `movie.nfo` as fallback.
Author
Owner

@brunoherrera commented on GitHub (Jun 12, 2024):

Are your NFOs generated by Jellyfin? If yes, we should only use movie.nfo as fallback.

yes, I'm letting Jellyfin generate them

@brunoherrera commented on GitHub (Jun 12, 2024): > Are your NFOs generated by Jellyfin? If yes, we should only use `movie.nfo` as fallback. yes, I'm letting Jellyfin generate them
Author
Owner

@Shadowghost commented on GitHub (Jun 12, 2024):

The behaviour was changed in #10339 and quite intensively tested. I'm currently investigating why this doesn't break movie metadata but instead breaks collections.

@Shadowghost commented on GitHub (Jun 12, 2024): The behaviour was changed in #10339 and quite intensively tested. I'm currently investigating why this doesn't break movie metadata but instead breaks collections.
Author
Owner

@Shadowghost commented on GitHub (Jun 12, 2024):

@brunoherrera can you please post the exact file layout of a movie where it is failing? I was unable to reproduce it so far.

@Shadowghost commented on GitHub (Jun 12, 2024): @brunoherrera can you please post the exact file layout of a movie where it is failing? I was unable to reproduce it so far.
Author
Owner

@brunoherrera commented on GitHub (Jun 12, 2024):

@brunoherrera can you please post the exact file layout of a movie where it is failing? I was unable to reproduce it so far.

Screenshot 2024-06-12 151508

G:\JELLYFIN\MOVIES\X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole)
backdrop.jpg
folder.jpg
landscape.jpg
logo.png
movie.nfo
X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole) - The Rogue Cut.mkv
X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole) - The Rogue Cut.nfo
X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole) - Theatrical Version.mkv

@brunoherrera commented on GitHub (Jun 12, 2024): > @brunoherrera can you please post the exact file layout of a movie where it is failing? I was unable to reproduce it so far. ![Screenshot 2024-06-12 151508](https://github.com/jellyfin/jellyfin/assets/32912794/2971a3d3-90b4-4858-a12f-a583637fa616) `G:\JELLYFIN\MOVIES\X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole)` `backdrop.jpg` `folder.jpg` `landscape.jpg` `logo.png` `movie.nfo` `X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole) - The Rogue Cut.mkv` `X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole) - The Rogue Cut.nfo` `X-Men - Days of Future Past (2014) (1080p BluRay x265 HEVC 10bit AAC 7.1 Tigole) - Theatrical Version.mkv`
Author
Owner

@theguymadmax commented on GitHub (Jun 12, 2024):

I had the same issue with the 10.8 releases. I renamed/removed a movie that had multiple versions, which was already in the library. Jellyfin did not like that! #4601

No matter what I did, I couldn't get the movie back into the collection. Jellyfin kept trying to add it back into the collection, spamming the xml file.

Ultimately I looked in the library database and saw the old filenames were still there #12070. Removing the old entries allowed me to finally add the movie back into the collection.

@theguymadmax commented on GitHub (Jun 12, 2024): I had the same issue with the 10.8 releases. I renamed/removed a movie that had multiple versions, which was already in the library. Jellyfin did not like that! #4601 No matter what I did, I couldn't get the movie back into the collection. Jellyfin kept trying to add it back into the [collection](https://github.com/user-attachments/files/15809458/collection.xml.txt), spamming the xml file. Ultimately I looked in the library database and saw the old filenames were still there #12070. Removing the old entries allowed me to finally add the movie back into the collection.
Author
Owner

@ashanrath commented on GitHub (Jun 27, 2024):

Ultimately I looked in the library database and saw the old filenames were still there #12070. Removing the old entries allowed me to finally add the movie back into the collection.

@theguymadmax can you clarify what old entries you removed? I tried removing all of the .nfo files in one of my root directories and doing a full scan, set to replace all metadata. The same issue occurred, though randomly on different entries then before. E.g. my initial problem was with "A New Hope" - wiping all the .nfo and rescanning fixed "A New Hope" but now I can't get "Return of the Jedi" in the collection. I suspect that it may be related to which version is scanned first, depending on version file names.

Should I instead be only wiping the .nfo and leaving the .nfo intact before rescanning?

@ashanrath commented on GitHub (Jun 27, 2024): > Ultimately I looked in the library database and saw the old filenames were still there #12070. Removing the old entries allowed me to finally add the movie back into the collection. @theguymadmax can you clarify what old entries you removed? I tried removing all of the .nfo files in one of my root directories and doing a full scan, set to replace all metadata. The same issue occurred, though randomly on different entries then before. E.g. my initial problem was with "A New Hope" - wiping all the .nfo and rescanning fixed "A New Hope" but now I can't get "Return of the Jedi" in the collection. I suspect that it may be related to which version is scanned first, depending on version file names. Should I instead be only wiping the <filename>.nfo and leaving the <movie>.nfo intact before rescanning?
Author
Owner

@jellyfin-bot commented on GitHub (Oct 25, 2024):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Oct 25, 2024): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@ashanrath commented on GitHub (Oct 25, 2024):

Still an issue.

@ashanrath commented on GitHub (Oct 25, 2024): Still an issue.
Author
Owner

@SciKoLogic commented on GitHub (Nov 5, 2024):

I think I suffer from the same issue although I do not have multiple versions of the movie.
I suspect a renaming of the file in question likely happened way back and now when I've tried to add it to a collection it simply does not want to.

In the collection.xml I can see it get added when I click "add to collection" and now, every time I scan my library I can see it get added again (in the collection.xml, not replacing the old entry but rather as a new one, a duplicate).

If I'm to guess a repro it would go something like this:

  1. (Optional) Add a "movie.nfo" file in the same folder as the movie to be tested. Make sure it does not get edited by Jellyfin before continuing.
  2. Go to your library containing the movie to test and choose "Manage Library" and tick "Automatically add to collection".
  3. Go to Libaries -> Display and tick "Group movies into collections".
  4. Add an existing movie to a collection and then add your test movie to that same collection.
  5. Confirm it's added in "Jellyfin/data/collections/YOURCOLLECTIONNAME [boxset]/colllection.xml"
  6. Rename the existing movie's filename (if that doesn't do it perhaps replacing the file without removing it's .nfo file will do).
  7. Scan your library
  8. Hopefully notice how the movie no longer shows in the collection you added it to.

If the repro is successful also notice how every time you scan your library the test movie gets another entry in your created collection's collection.xml.

@SciKoLogic commented on GitHub (Nov 5, 2024): I think I suffer from the same issue although I do not have multiple versions of the movie. I suspect a renaming of the file in question likely happened way back and now when I've tried to add it to a collection it simply does not want to. In the collection.xml I can see it get added when I click "add to collection" and now, every time I scan my library I can see it get added again (in the collection.xml, not replacing the old entry but rather as a new one, a duplicate). If I'm to guess a repro it would go something like this: 0. (Optional) Add a "movie.nfo" file in the same folder as the movie to be tested. Make sure it does not get edited by Jellyfin before continuing. 1. Go to your library containing the movie to test and choose "Manage Library" and tick "Automatically add to collection". 2. Go to Libaries -> Display and tick "Group movies into collections". 3. Add an existing movie to a collection and then add your test movie to that same collection. 4. Confirm it's added in "Jellyfin/data/collections/YOURCOLLECTIONNAME [boxset]/colllection.xml" 5. Rename the existing movie's filename (if that doesn't do it perhaps replacing the file without removing it's .nfo file will do). 6. Scan your library 7. Hopefully notice how the movie no longer shows in the collection you added it to. If the repro is successful also notice how every time you scan your library the test movie gets another entry in your created collection's collection.xml.
Author
Owner

@thamow commented on GitHub (Nov 30, 2024):

I seem to have the same issue. HOWEVER when I tried the workaround described by the first post from @brunoherrera, the issue persists and the movies are not added. Additionally, one of the three movies I tried to add to the same collection does actually show up, despite it having multiple versions and the .nfo situation being the same as well!

Captain America - Civil War (2016) - 2160p.mkv shows up, the other two don't:

<CollectionItems>
    <CollectionItem>
      <Path>/media/movies/Captain America - Civil War (2016)/Captain America - Civil War (2016) - 2160p.mkv</Path>
    </CollectionItem>
    <CollectionItem>
      <Path>/media/movies/Captain America - The First Avenger (2011)/Captain America - The First Avenger (2011) - 2160p.mkv</Path>
    </CollectionItem>
    <CollectionItem>
      <Path>/media/movies/Captain America - The Winter Soldier (2014)/Captain America - The Winter Soldier (2014) - 2160p.mkv</Path>
    </CollectionItem>
  </CollectionItems>

Captain America - Civil War (2016)

'Captain America - Civil War (2016) - 1080p.mkv'
'Captain America - Civil War (2016) - 1080p.nfo'
'Captain America - Civil War (2016) - 2160p.mkv'
backdrop.jpg
'behind the scenes'
'deleted scenes'
extras
folder.jpg
interviews
landscape.jpg
logo.png
movie.nfo

Captain America - The First Avenger (2011)

'Captain America - The First Avenger (2011) - 1080p.mkv'
'Captain America - The First Avenger (2011) - 1080p.nfo'
'Captain America - The First Avenger (2011) - 2160p.mkv'
backdrop.jpg
'deleted scenes'
extras
folder.jpg
interviews
landscape.jpg
logo.png
movie.nfo
trailers

Captain America - The Winter Soldier (2014)

'Captain America - The Winter Soldier (2014) - 1080p.mkv'
'Captain America - The Winter Soldier (2014) - 1080p.nfo'
'Captain America - The Winter Soldier (2014) - 2160p.mkv'
backdrop.jpg
'behind the scenes'
extras
folder.jpg
landscape.jpg
logo.png
movie.nfo
trailers

@thamow commented on GitHub (Nov 30, 2024): I seem to have the same issue. HOWEVER when I tried the workaround described by [the first post](https://github.com/jellyfin/jellyfin/issues/12080#issue-2347511613) from @brunoherrera, the issue persists and the movies are not added. Additionally, one of the three movies I tried to add to the same collection does actually show up, despite it having multiple versions and the .nfo situation being the same as well! Captain America - Civil War (2016) - 2160p.mkv shows up, the other two don't: ```xml <CollectionItems> <CollectionItem> <Path>/media/movies/Captain America - Civil War (2016)/Captain America - Civil War (2016) - 2160p.mkv</Path> </CollectionItem> <CollectionItem> <Path>/media/movies/Captain America - The First Avenger (2011)/Captain America - The First Avenger (2011) - 2160p.mkv</Path> </CollectionItem> <CollectionItem> <Path>/media/movies/Captain America - The Winter Soldier (2014)/Captain America - The Winter Soldier (2014) - 2160p.mkv</Path> </CollectionItem> </CollectionItems> ``` Captain America - Civil War (2016) > 'Captain America - Civil War (2016) - 1080p.mkv' > 'Captain America - Civil War (2016) - 1080p.nfo' > 'Captain America - Civil War (2016) - 2160p.mkv' > backdrop.jpg > 'behind the scenes' > 'deleted scenes' > extras > folder.jpg > interviews > landscape.jpg > logo.png > movie.nfo Captain America - The First Avenger (2011) > 'Captain America - The First Avenger (2011) - 1080p.mkv' > 'Captain America - The First Avenger (2011) - 1080p.nfo' > 'Captain America - The First Avenger (2011) - 2160p.mkv' > backdrop.jpg > 'deleted scenes' > extras > folder.jpg > interviews > landscape.jpg > logo.png > movie.nfo > trailers Captain America - The Winter Soldier (2014) > 'Captain America - The Winter Soldier (2014) - 1080p.mkv' > 'Captain America - The Winter Soldier (2014) - 1080p.nfo' > 'Captain America - The Winter Soldier (2014) - 2160p.mkv' > backdrop.jpg > 'behind the scenes' > extras > folder.jpg > landscape.jpg > logo.png > movie.nfo > trailers
Author
Owner

@thamow commented on GitHub (Dec 1, 2024):

I have found a workaround - which I am not very happy with. If you add [] around the version (so e.g. 'Captain America - The Winter Soldier (2014) - [1080p].mkv' and so on), it works flawlessly. I am not happy with this, because it means that in the frontend the version contains those square brackets as well (so it shows up as [1080p] in the drop down)...

(Trying this was not my idea but I cannot credit whomever did come up with this, since I can't find the original post anymore. Maybe it was them).

@thamow commented on GitHub (Dec 1, 2024): I have found a workaround - which I am not very happy with. If you add [] around the version (so e.g. 'Captain America - The Winter Soldier (2014) - [1080p].mkv' and so on), it works flawlessly. I am not happy with this, because it means that in the frontend the version contains those square brackets as well (so it shows up as [1080p] in the drop down)... (Trying this was *not* my idea but I cannot credit whomever did come up with this, since I can't find the original post anymore. Maybe it was [them](https://www.reddit.com/r/jellyfin/comments/lkqw25/cant_add_multipleversion_movie_to_a_collection)).
Author
Owner

@theguymadmax commented on GitHub (Feb 11, 2025):

Closing as a duplicate of #11736. Other thread as more detailed info as to the cause of the issue.

@theguymadmax commented on GitHub (Feb 11, 2025): Closing as a duplicate of #11736. Other thread as more detailed info as to the cause of the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#5996