Closed mortyobnoxious closed 4 years ago
I agree this would be convenient. However, since this script relies entirely on subliminal for the actual downloading, there is not much I can change on my end. Subliminal only provides the option to download the "best" subtitles, according to their algorithm.
You should either change your filenames to something more descriptive (e.g. title/episode/release/year/etc.) to provide subliminal with the most accurate info, or file this issue in the subliminal repo itself: https://github.com/Diaoul/subliminal/issues/new.
Oh okay, thanks.
Btw, this is unrelated to this issue, but script works with "streaming URLs", too.
For example when I paste a YouTube URL, it tries to find subtitles for it. Is this an expected behavior?
I personally only play local files in MPV, so I haven't set any exception for URLs. So indeed I would expect the script to try to find subtitles for everything you play in MPV.
It shouldn't be too hard to set a boolean that prevents subtitle downloading for URLs though.
I searched for it and found this, put it in "download_subs" function:
local filepath = mp.get_property("path")
if(filepath.find(filepath, "http")) then
return
end
It worked, I guess. Since I don't know anything about lua, I'm not sure how this solution is okay. But it worked :)
I made it a little bit different by changing auto to false for URLs, if i wanted to download subtitles manually for URLs by pressing "b".
local filepath = mp.get_property("path")
if(filepath.find(filepath, "http")) then
auto = false
end
but it didn't work.
Thank you for the suggestion! I have added the fix for everyone's convenience.
I agree this would be convenient. However, since this script relies entirely on subliminal for the actual downloading, there is not much I can change on my end. Subliminal only provides the option to download the "best" subtitles, according to their algorithm.
Oddly, trueautosub (https://github.com/fullmetalsheep/mpv-iina-scripts, https://gist.github.com/fullmetalsheep/28c397b200a7348027d983f31a7eddfa), also based on subliminal has this description:
If you got a wrongly synced sub, press b or your customised shortcut to get another subtitle.Rinse and repeat until you find the proper sub tada
Note: only tested on OSX, this should technically work with linux as well
mpv-autosub is described as an improvement of trueautosub.
(mpv-autosub works fine, unlike the other)
in order to correct wrong subtitles, this mpv script works pretty well: https://github.com/joaquintorres/autosubsync-mpv.
Hi, when it downloads wrong subtitle or unsynchronized subtitle, pressing "b" again to download alternative subtitle (of the same language) would be great, if you consider.