danieladov / jellyfin-plugin-mergeversions

This plugin scans all your movies and groups every repeated movie in one version
MIT License
215 stars 14 forks source link

MergeVersions Creating Nonexistant Duplicates #60

Open wahawley opened 4 months ago

wahawley commented 4 months ago

Hello, I had an issue arise where a hard drive wasn't mounting properly on my Jellyfin machine, and had to update the path of each of my libraries in Jellyfin to the new mount location. Ever since then MergeVersions has been creating phantom duplicates of movies and tv shows that don't exist.

I have tried clearing the TMDB cache, scanning and cleaning the Jellyfin DB's, splitting the movies/shows followed by uninstalling and reinstalling the app. These duplicates do not exist prior to reinstalling MergeVersions, and as soon as I merge either my movies or TV shows, every single movie and show has a duplicate, and the duplicates have their own duplicates (so 2 versions instead of 1, and 4 versions instead of 2). If I try to access these phantom versions, they do not exist and I get an error.

The only thing I can think of is that MergeVersions has some kind of cache that I'm not seeing and don't have the ability to clear. I have checked all the options.xml files for TV, Movies, and collections and all paths seem to be correct - no duplicate paths appear to exist within Jellyfin. So I think this is an issue with MergeVersions. Can you please advise as to how to fix this?

Thank you

Wernouxe commented 3 months ago

Hello, I had an issue arise where a hard drive wasn't mounting properly on my Jellyfin machine, and had to update the path of each of my libraries in Jellyfin to the new mount location. Ever since then MergeVersions has been creating phantom duplicates of movies and tv shows that don't exist.

I have tried clearing the TMDB cache, scanning and cleaning the Jellyfin DB's, splitting the movies/shows followed by uninstalling and reinstalling the app. These duplicates do not exist prior to reinstalling MergeVersions, and as soon as I merge either my movies or TV shows, every single movie and show has a duplicate, and the duplicates have their own duplicates (so 2 versions instead of 1, and 4 versions instead of 2). If I try to access these phantom versions, they do not exist and I get an error.

The only thing I can think of is that MergeVersions has some kind of cache that I'm not seeing and don't have the ability to clear. I have checked all the options.xml files for TV, Movies, and collections and all paths seem to be correct - no duplicate paths appear to exist within Jellyfin. So I think this is an issue with MergeVersions. Can you please advise as to how to fix this?

Thank you

Hi, does it do that to you too? image

Panda260 commented 3 months ago

i have the same but with an image loadet

fogolin commented 1 month ago

Having the same issue here.

seems like might be related to some update: https://github.com/danieladov/jellyfin-plugin-mergeversions/issues/62

danieladov commented 1 month ago

Hi, could you provide the steps to reproduce the problem? I don't have much time at the moment, but I'll try to fix it when I can.

fogolin commented 1 month ago

Hi, could you provide the steps to reproduce the problem? I don't have much time at the moment, but I'll try to fix it when I can.

Sure, here are some more information:

SETUP

  1. I'm using multiple mounts to provide media content to the Jellyfin installation, so I'll have a mount for each person's media folder in my network, ie: /cloud/data/lucas and /cloud/data/john
  2. Each library is composed from these multiple mounts, so Movie library has both /cloud/data/lucas/Movies and /cloud/data/john/Movies
  3. I've recently updated the paths to better organize the cloud folder, so all data is now under data, and no longer under the direct path of /cloud, so what was before /cloud/lucas/Movies/Movie Name (2020) is now /cloud/data/lucas/Movies/Movie Name (2020), and yes, I've deleted the old paths from the libraries
  4. After updating the mounts and paths I've updated Jellyfin, all plugins, cleared all the caches, ran a full library scan replacing all metadata
  5. I've noticed some errors in the logs related to outdated paths and looked into the plugins, then I've noticed that if I remove the MergeVersions plugin, all paths are correct, so the metadata is updated on the app and database
  6. I've wen inside the filesystem, removed all files related to the plugin in my installation manually and reinstalled it after restarting the server
  7. Immediately after installing the plugins, the doubled paths are back, so seems like something in the database or some hidden cache for the plugin itself that persists after a complete removal of the plugin

The Issue

If you go to any movie or series that have multiple versions (4k and 1080p, for example), it'll have multiple phantom versions of that movie:

image

If we go further down and check media information, you'll have multiple paths to the same file, both the outdated one and the correct one (look at the paths below):

Movie.2024.2160p.4K.WEB.x265.10bit.AAC5.1
Recipiente mkv
Path /media/lucas/Video/Movies/Movie (2024) [imdbid-00]/Movie.2024.2160p.4K.WEB.x265.10bit.AAC5.1.mkv
Size 5591 MB

Movie.2024.2160p.4K.WEB.x265.10bit.AAC5.1
Recipiente mkv
Path /media/data/lucas/Video/Movies/Movie (2024) [imdbid-00]/Movie.2024.2160p.4K.WEB.x265.10bit.AAC5.1.mkv
Size 5591 MB

Movie.2024.1080p.WEBRip.x265.10bit.AAC5.1
Recipiente mp4
Path /media/lucas/Video/Movies/Movie (2024) [imdbid-00]/Movie.2024.1080p.WEBRip.x265.10bit.AAC5.1-.mp4
Size 2091 MB

Movie.2024.1080p.WEBRip.x265.10bit.AAC5.1
Recipiente mp4
Path /media/data/lucas/Video/Movies/Movie (2024) [imdbid-00]/Movie.2024.1080p.WEBRip.x265.10bit.AAC5.1-.mp4
Size 2091 MB

In some cases, it lists a file that can't even be probed, in the case of this series, it won't even list the file data, I guess it was not present by the time it was scanned with the updated paths, but it still show up as a duplicate:

Series.S01E01.1080p.HEVC.x265-
Recipiente mkv
Path /media/data/lucas/Video/Series/Series (2024) [imdbid-00]/Season 01/Series.S01E01.1080p.HEVC.x265.mkv
Size 187 MB

Series.S01E01.1080p.HEVC.x265
Recipiente mkv
Path /media/lucas/Video/Series/Series (2024) [imdbid-00]/Season 01/Series.S01E01.1080p.HEVC.x265.mkv

If we split using the double headed arrow on the frontend interface, then the duplicates disappear, but as soon as we merge versions, they come back.

I hope that it gives you some more information to look into this issue, and if you have any further need of information, I'm willing to make a call to open the same exact environment in which this is happening with you, alright?

Thanks in advance and hope we can sort this out soon, love your plugins!

danieladov commented 3 weeks ago

Sure, here are some more information:

Hi! Thanks for the detailed report.

Could you try using the attached plugin? Please follow these steps:

  1. Stop the server.
  2. Replace the existing plugin DLL in your plugins folder with the attached one.
  3. Restart the server.
  4. Split all movies and merge them again.

Let me know if this resolves the issue. Thanks! Jellyfin-Plugin-MergeVersions.zip

maarten-vdb commented 2 weeks ago

Sure, here are some more information:

Hi! Thanks for the detailed report.

Could you try using the attached plugin? Please follow these steps:

  1. Stop the server.
  2. Replace the existing plugin DLL in your plugins folder with the attached one.
  3. Restart the server.
  4. Split all movies and merge them again.

Let me know if this resolves the issue. Thanks! Jellyfin-Plugin-MergeVersions.zip

This fixed the problem for me!