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

Switch to REST API #1

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

Switch to REST API #1

wants to merge 8 commits into from

Conversation

poptosic
Copy link
Owner

No description provided.

@DaedalusBLN
Copy link

DaedalusBLN commented Apr 26, 2020

You sent the pull request to yourself, but the repo you forked this from is outdated anyway.

I am not affiliated with Videolan, just trying to get my copy to work and ran a search across forks.

This kinda works. But can't get "Load and save" functionality to work, it shows a full progress bar on a subtitle downloading and does nothing afterwards. Also, switching interface languages has undesired side-effects such as empty strings and selectors not working anymore.

The repo you forked from is not active anymore

You'd better use the current version as base:

It can be found at:

https://code.videolan.org/videolan/vlc/-/commits/master/share/lua/extensions/VLSub.lua

https://github.com/videolan/vlc/commits/master/share/lua/extensions/VLSub.lua

Thanks for trying to fix this.

@poptosic
Copy link
Owner Author

@DaedalusBLN Thanks very much for your comment!

I opened the PR to my repo since I wasn't quite sure what to do with this code since the original repo seems dead.

I realized a little late that this wasn't the latest version, so I backported most of the code from the latest version here. This is working for me on VLC 3.0.8 on Windows including downloading the subtitles. Which version are you using?
Even though it's not strictly necessary, do you have an account in opensubtitles? Note that opensubtitles gets overloaded occasionally so that's when you may experience issues with downloading (apparently that's less likely to happen if you're logged in but it can still happen).

Thanks for the suggestion, I'll consider forking the other repo and moving this code over.

@DaedalusBLN
Copy link

DaedalusBLN commented Apr 26, 2020

@poptosic I am using v3.0.9.2 stable on win64. http://download.videolan.org/pub/videolan/vlc/3.0.9.2/

The error I am getting is: lua warning: Error while running script C:\Program Files\VideoLAN\VLC\lua\extensions\vlsub.lua, function (null)(): ...\Program Files\VideoLAN\VLC\lua\extensions\vlsub.lua:1703: attempt to concatenate field 'mess_save_warn' (a nil value)

I am logged in to OpenSubtitles and in the config.

The file/URI I am testing this on is actually a direct HTTP link stream to an MKV file, not a local file.

@DaedalusBLN
Copy link

DaedalusBLN commented Apr 26, 2020

@poptosic W00t! Works perfectly now :) Thanks mate!

@DaedalusBLN
Copy link

DaedalusBLN commented Apr 27, 2020

@poptosic Thanks again, this is awesome!

I have a feature suggestion for ya: enabling the extension to be activated by pressing Alt-I-V while in VLC as others have done before (exebetche#83). To do that I suggest you change line 345 to
shortdesc = "&"..app_name;
& followed by any letter enables Alt key combo binding. Sadly it is visible hence I didn't add it to the title field and preferred shortdesc, but that's a small sacrifice.

Adding that to the code enabled me to do some additional VLC AutoHotKey automations I wanted, binding the extension to be activated by hitting the Home key on my keyboard while my script is running and the window is focused ^_^

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