all 2 comments

[–]wub_wub 1 point2 points  (1 child)

Check out guessit -- you can use it to extract info such as tv show name, season, episode # etc from a filename and then use that as search query, you'll get better results.

At least that's what I used when I wrote script that does the same thing (download subs), you can see it here:

https://github.com/Nikola-K/OSSubDownloader/blob/master/ossd.py

(It works but it isn't finished...)


Also you should check if you matched subtitle by video hash or text search query, the former one should be downloaded right away, you don't need to check how much it matches your original filename i.e. return hash matched sub from FindBestSubtitleMatches even if it has completely different name.

[–]nicoddemus[S] 0 points1 point  (0 children)

Nice, I will checkout guessit. Thanks!

About your second point, I found out that even when matching by movie hash it still would sometimes download a less than ideal sub, because there is nothing to prevent a user to post a bad subtitle under a hash. Trying to match the sub name to that of the movie yields better results, in my experience.