Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Filter out" bad subs #133

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

"Filter out" bad subs #133

wants to merge 3 commits into from

Conversation

Aigrefin
Copy link
Contributor

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 lunit to run them like this :
lunit tests/*
I'm open to any other solution, and would be glad to improve the code before merge.

@exebetche
Copy link
Owner

exebetche commented Jul 16, 2016

Hi, thank you for your work.
Correct me if I'm wrong but your code doesn't currently sort or discard the subtitles based on the time difference between the movie duration and the time of the last spoken line, it just display this times them right? Sorry but I haven't much time to check this in details myself.

Cdt,

@Aigrefin
Copy link
Contributor Author

Aigrefin commented Jul 16, 2016

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 ?

@Aigrefin
Copy link
Contributor Author

Okay so now subs are also ordered based on distance between movie duration and last spoken line. Thanks for the suggestion !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants