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

Fails mapping to input.conf? #15

Open
mhertz opened this issue Aug 1, 2018 · 2 comments
Open

Fails mapping to input.conf? #15

mhertz opened this issue Aug 1, 2018 · 2 comments

Comments

@mhertz
Copy link

mhertz commented Aug 1, 2018

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
Copy link
Author

mhertz commented Aug 3, 2018

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
Copy link
Author

mhertz commented Mar 19, 2022

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.

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

No branches or pull requests

1 participant