I made a vlc extension subtitles extension that autoloads the proper subtitle if available in the current folder. However, I can't implement the following:
I can't automatically run the extension on each video load. I can only run the extension manually (ie via function activate()
). This may be a built in safety feature. If there isn't a way to automatically run on each video load, is there a way to assign the extension a hotkey?
After loading the subtitles, I can't have it automatically select it. I have to manually set it after its loaded. I am using the following to add subtitles with uriSub set as a file path to the subtitle:
vlc.var.set(vlc.object.input(), 'sub-file', uriSub) vlc.input.add_subtitle(uriSub)
FYI, I am basing my code on existing extensions since I hadn't found documentation to base it off.
https://www.opencode.net/tristargod/vlcsubber
Update 1
I was able to resolve issue 2 by vlc.input.add_subtitle(uriSub, true)
Still need help with issue 1
vlc.input.add_subtitle(uriSub, true)
resolved it