Komet / MediaElch

Media Manager for Kodi
https://mediaelch.github.io/mediaelch-doc/about.html
GNU Lesser General Public License v3.0
845 stars 94 forks source link

Different movie names that end in - Part X are treated as same movie #1535

Open piecler opened 1 year ago

piecler commented 1 year ago

I have four movies with this problem and cannot scrape them properly.

Harry Potter and the Deathly Hallows - Part 1 (2010).mkv Harry Potter and the Deathly Hallows - Part 2 (2011).mkv The Hunger Games - Mockingjay - Part 1 (2014).mkv The Hunger Games - Mockingjay - Part 2 (2015).mkv

Each two parts are treated as the same movie with two files instead of two individual movies. But these are clearly different movies.

I try to name the files according to imdb which have an : instead of the -. : however is not valid in a filename. I'd rather not want to change the names here, since these are more or less official.

As far as I have found out there is a function stackedBaseName which contains a regex that matches in this case. Since I have no movies that are split in multiple files, an easy fix for me would be to disable this part merging feature alltogether. Maybe there is a setting in the advancedsettings.xml?

This is on Windows with version 2.8.19-dev.

ticao2 commented 1 year ago

Are the media files all in one folder? Or does each movie have its own folder?

piecler commented 1 year ago

All files (mkv, nfo, art) in the same folder.

ticao2 commented 1 year ago

I'm not sure, but... After the first title scraper is done, the NFO is created. In subsequent updates, I believe the ID is used and not the title anymore. So in the first scraper you can add the correct id manually. Perhaps this will solve your problem. All files in the same folder are accepted, but I believe that even Kodi recommends a folder for each title.

bugwelle commented 1 year ago

Hi,

in MediaElch's settings, is your folder marked as "separate folders" by any chance? :)

If not, it may be a bug. Thanks for reporting.

Regards, Andre

piecler commented 1 year ago

I have the movies in a subfolder of the added folder in the global directory settings.

In this case I have added /Movies with separate folders unchecked. This contains many movies, all scape fine. There is a subfolder /Movies/The Hunger Games which contains The Hunger Games - Mockingjay - Part 1 (2014).mkv The Hunger Games - Mockingjay - Part 2 (2015).mkv The Hunger Games - Catching Fire (2013).mkv The Hunger Games (2012).mkv The last two scrape fine. Mockingjay is treated as one movie with two parts and cannot be scraped properly.

ticao2 commented 1 year ago

Not sure if I understood correctly, but... If you have a folder in Separated condition. And inside this folder you have a Sub Folder in the Not Separated condition. I think it won't work. The one that will prevail will be the condition of the superior, primary Folder, in this case, Separated.

piecler commented 1 year ago

Still, I have not checked separate folders for any of my folders. Also my structure does not matter here. Just create a folder with two mkv files: The Hunger Games - Mockingjay - Part 1 (2014).mkv The Hunger Games - Mockingjay - Part 2 (2015).mkv And add it to Mediaelch without checking separate folders and try to scrape it. It handles both files incorrectly as the same movie.

ticao2 commented 1 year ago

Yes. Indeed you are right. A hypothesis to test is to put the year before part. Maybe the system realizes that they are two different. Harry Potter and the Deathly Hallows (2010) - Part 1.mkv Harry Potter and the Deathly Hallows (2011) - Part 2.mkv Or not use the term Party. Harry Potter and the Deathly Hallows 1 (2010).mkv Harry Potter and the Deathly Hallows 2 (2011).mkv

The difficulty is the format used when they are parts of a single film divided into two parts. cd# - dvd# - disc# - disk# - part# - pt# - A, B, C, D See here: https://kodi.wiki/view/Naming_video_files/Movies Maybe use a dot or dash separating it. Part.1 or Part-1 I don't know if it works. Never tested.

bugwelle commented 1 year ago

Hi,

sorry for the delay. This happens in case "Sep. Folders" is not checked. The reason is that we had many users that split up large files into smaller ones. Possibly because older filesystems didn't support files larger than 2GiB.

That clashes with your expectations.

Workaround: Rename Part to e.g. Part+9 or something else. We check for cd|dvd|pt|part|disc followed by one or more of _.- and then followed by a number of a-f.

Solution: This needs of course some work on my side. I have the feeling Harry-Potter was the first large-ish movie that had "Part 1" and "Part 2". I think what would be one way to deal with it is: Check that Part X does not appear prior to the year (YYYY). What do you think?

Regards, Andre