osdb-mpv icon indicating copy to clipboard operation
osdb-mpv copied to clipboard

Fails mapping to input.conf?

Open mhertz opened this issue 6 years ago • 2 comments

Firstly, thanks alot, love this script!

I was trying to map some osdb options in input.conf, since I wanted as default only my native language, and then if that fails I could hit a key and add more languages and up the results shown - I wanted this because it's annoying to go through 20-30 subs just to see if any matches your own language and works(they are spread, also because both hash and name searching is enabled).

I didn't succeed with this and tried both binding in input.conf using 'script-opts=osdb-whatever' and 'script-message-to osdb whatever' etc. There's also a 'script-binding' option to use, but I don't think osdb exposes anything to use from there?

I read someone making a report about something similar in MPV bugtracker, and wm4 answered:

"It's up to the script to pick up new option values when they change."

Is this the issue i'm having here? If yes, then please kindly consider this a feature-request then ;)

Thanks in advance!

mhertz avatar Aug 01 '18 20:08 mhertz

Btw, even if I could get 'script-opts' to work with input.conf, then I couldn't use it, because the delimiter is a comma, and so this option doesn't work in mpv.conf either, because of that, and I tried everything i.e. quote like your example, which isn't even supported, and escaping etc:

script-opts:osdb-language=dan,swe,eng

of-course other options work in mpv.conf without commas, like:

script-opts:osdb-numSubtitles=100

But still just not from input.conf.

So, as request, if it could be possible somehow to toggle these options from input.conf + I'd recommend changing the delimiter of the language command as we cannot use that currently from mpv.conf if wanting more than one language(so I use osdb.conf instead because of that).

Thanks again for awesome plugin!

mhertz avatar Aug 03 '18 19:08 mhertz

Just wanted to add that slashdevslashurandom has added support for this feature in his fork i.e language switching through hotkey. I checked the network insights stats of this project, and found his fork to be most recent also, and additionally includes a lua51 compatibility fix. Thanks alot @slashdevslashurandom, much appreciated!

https://github.com/slashdevslashurandom/osdb-mpv

Edit: @slashdevslashurandom - Sorry but does the language mod work for you? I cannot switch languages, and neither even use single language i.e. languages={'dan', 'swe'} or languages={'dan'}. Cycling langs states error in line 133 of attempting to concatenate a nil value. Thanks in advance, and sorry posting here, but you have no issues section on your repo.

mhertz avatar Mar 19 '22 22:03 mhertz