ghomasHudson / Jellyfin-Auto-Collections

Automatically make jellyfin collections from IMDB, Letterboxd lists and more.
MIT License
60 stars 8 forks source link

Match by External IDs #31

Open ghomasHudson opened 3 weeks ago

ghomasHudson commented 3 weeks ago

Jellyfin items may have the IMDb or tmdb ids as metadata. We should search by these first for higher quality matching than name + year (which we can fallback to if no items are found with the id).

BoHoliday commented 3 weeks ago

This would be great since the plugin doesn't work properly for show-only lists. Currently, the plugin adds random episodes with the same name from other shows and sometimes even adds movies to the collection when it's supposed to only be searching for shows.

ghomasHudson commented 3 weeks ago

Added a partial implementation - imdb ids are now used as an additional filter. Searching via imdb_id doesnt seem to be supported by the jellyfin api so I'll have to work on the implementation.

BoHoliday commented 3 weeks ago

Added a partial implementation - imdb ids are now used as an additional filter. Searching via imdb_id doesnt seem to be supported by the jellyfin api so I'll have to work on the implementation.

This is great! Thanks so much for the work. Will this be implemented into the mdblist plugin as well?

ghomasHudson commented 2 weeks ago

is it not working already?

BoHoliday commented 2 weeks ago

The mdblist plugin is still adding single episodes or movies to the collection with the same name instead of the series, so I don't think it's using any imdb ids as a filter. I have series-only collections, and the script doesn't seem to know that it should only be adding series to the collection, not episodes or movies.

2024-06-16 02:38:05.420 | INFO     | utils.jellyfin:add_item_to_collection:133 - Added Presumed Innocent to collection
2024-06-16 02:38:09.639 | INFO     | utils.jellyfin:add_item_to_collection:133 - Added How Music Got Free to collection
2024-06-16 02:38:13.854 | INFO     | utils.jellyfin:add_item_to_collection:133 - Added Fantasmas to collection
2024-06-16 02:38:18.364 | INFO     | utils.jellyfin:add_item_to_collection:133 - Added Hitler and the Nazis: Evil on Trial to collection
2024-06-16 02:38:22.472 | INFO     | utils.jellyfin:add_item_to_collection:133 - Added The Acolyte to collection

Screenshot_4

ghomasHudson commented 2 weeks ago

The mdblist plugin is still adding single episodes or movies to the collection with the same name instead of the series, so I don't think it's using any imdb ids as a filter. I have series-only collections, and the script doesn't seem to know that it should only be adding series to the collection, not episodes or movies.

Well. There are 2 problems here. The existing implementation fell back to basic matches if there was no imdb_match. I've fixed this so if imdb_id is present, it will only match with imdb ids.

Secondly, the media type filters in jellyfin.py need updating. I'll push some changes to hopefully fix these issues.

BoHoliday commented 2 weeks ago

The mdblist plugin is still adding single episodes or movies to the collection with the same name instead of the series, so I don't think it's using any imdb ids as a filter. I have series-only collections, and the script doesn't seem to know that it should only be adding series to the collection, not episodes or movies.

Well. There are 2 problems here. The existing implementation fell back to basic matches if there was no imdb_match. I've fixed this so if imdb_id is present, it will only match with imdb ids.

Secondly, the media type filters in jellyfin.py need updating. I'll push some changes to hopefully fix these issues.

Works flawlessly now, thank you!