"Filter out" bad subs - #133
Conversation
|
Hi, thank you for your work. Cdt, |
|
That's right, it only displays the time of the last spoken line. I would be against discarding (better let the user chooses what he wants). However sorting could be a good help, I can look into that : The further the last spoken line is from the movie end, the lower it will be in the list. Is that what you had in mind ? |
|
Okay so now subs are also ordered based on distance between movie duration and last spoken line. Thanks for the suggestion ! |
Sometimes search by hash is not enough, so we use search by name but it brings many results with wrong subtitles or bad sync (inexact subtitle name, bad meta, ...).
This feature is a first try to help sort the subtitles which are the most irrelevant. VLSub window now displays the movie length, and for each subtitle the time at which the last subtitle appears. This way, last subs that appear later, or ends really sooner, than the movie end are certainly the wrong ones.
This code is tested. I had to export the necessary functions from VLSub for the tests, and to put a default value for globals to ease testing. You need
lunitto run them like this :lunit tests/*I'm open to any other solution, and would be glad to improve the code before merge.