Closed ascendedguard closed 9 years ago
Yeah, that's not good. Overwriting shouldn't be happening but I can see why. I'll have a fix for you soon.
I guess the real issue is here:
https://github.com/JasonMillward/Autorippr/blob/master/classes/handbrake.py#L41-L43
Since all titles will have the same moviename
, multiple titles get named the same, and HandBrakeCLI appears to overwrite automatically (FFmpeg does not and errors out on title 2).
If you have an idea on how you want to fix this, I could likely work on it over the weekend. I'm guessing you have to change the name otherwise the files would be named the same. I also thought about ripping in /tmp/ and encoding to the output dir (and not renaming), but that only makes sense if doing both --rip --compress.
The origin of the problem is more here: https://github.com/JasonMillward/Autorippr/blob/master/autorippr.py#L134
Which sets movie_title before its time: https://github.com/JasonMillward/Autorippr/blob/master/autorippr.py#L137
And gets stored https://github.com/JasonMillward/Autorippr/blob/master/autorippr.py#L155
The way I see it, the following changes need to happen.
makemkv.set_title
needs to be changed to set_path
and only effect the output directory.set_title
function needs to be created, but one that isn't used outside of the class. This should stop multiple files being overwritten. And optionally:
I've started work on fixing this but I have limited free time so I might be slow in fixing. If you want to work on a solution I'm very happy to accept pull requests.
I coded together an option to encode a single title where titleId == '0', but 0 doesn't appear to always be the main track. On "The Hangover", this was correct (total of 3 tracks). On "Inception", 0 was the commentary track (total of 2 tracks).
This is what the disc titles looked like for the two:
The Hangover
2015-05-04 22:50:54 - Makemkv - DEBUG - MakeMKV found 3 titles
2015-05-04 22:50:54 - Makemkv - DEBUG - MakeMKV title info: Disc Title: ['The Hangover'], Title No.: 1, Title: ['The_Hangover_t01.mkv'],
2015-05-04 22:50:54 - Makemkv - DEBUG - Title skipped due to singleReturn.
2015-05-04 22:50:54 - Makemkv - DEBUG - MakeMKV title info: Disc Title: ['The Hangover'], Title No.: 0, Title: ['The_Hangover_t00.mkv'],
2015-05-04 22:50:54 - Makemkv - DEBUG - MakeMKV title info: Disc Title: ['The Hangover'], Title No.: 2, Title: ['The_Hangover_t02.mkv'],
2015-05-04 22:50:54 - Makemkv - DEBUG - Title skipped due to singleReturn.
2015-05-04 22:50:55 - Rip - DEBUG - Attempting to rip The_Hangover_t00.mkv from The Hangover
2015-05-04 23:09:02 - Rip - INFO - It took 18 minute(s) to complete the ripping of The_Hangover_t00.mkv from The Hangover
Inception
2015-05-05 03:20:32 - Makemkv - DEBUG - MakeMKV found 2 titles
2015-05-05 03:20:32 - Makemkv - DEBUG - MakeMKV title info: Disc Title: ['Inception'], Title No.: 1, Title: ['Inception_t01.mkv'],
2015-05-05 03:20:32 - Makemkv - DEBUG - Title skipped due to singleReturn.
2015-05-05 03:20:32 - Makemkv - DEBUG - MakeMKV title info: Disc Title: ['Inception'], Title No.: 0, Title: ['Inception_t00.mkv'],
2015-05-05 03:20:33 - Rip - DEBUG - Attempting to rip Inception_t00.mkv from Inception
2015-05-05 03:55:13 - Rip - INFO - It took 34 minute(s) to complete the ripping of Inception_t00.mkv from Inception
I'll take a closer look and see if there's either a better way to determine which is the main track, but preventing the overwrites may still be the best option here. I could do a pull request for the singleReturn, but it seems like it wont solve the problem.
Closing as #78 should fix this.
Currently using 1.7.0-test1.
I'm looking for a way to limit the script to only ripping/compressing the first title for Blu-ray movies. Currently, it will run makemkvcon on all titles > minLength, compress the 1st, then compress the 2nd, overwriting the first.
The larger problem is that the second tends to be a "special features" version of the movie. In the case of Inception, the 2nd title was the full movie with director commentary mixed in.
An alternate solution could be preventing the second encode from overwriting the first, so I could examine both and delete the wrong one.
Here's what the autorippr.log looks like in the case of multiple titles:
The end result was a single Inception.mkv where I'm not sure which title was the one saved.