Opened 7 years ago
Last modified 11 months ago
#3883 reopened enhancement
Lua extensions: auto-load support
| Reported by: | Riley | Owned by: | Jean-Philippe Andre |
|---|---|---|---|
| Priority: | normal | Milestone: | Features paradize |
| Component: | LUA run-time | Version: | master git |
| Severity: | normal | Keywords: | |
| Cc: | Difficulty: | unknown | |
| Platform(s): | all | Work status: | Not started |
Description
Active Lua extensions should show up on the Hotkey Preferences page, so you can assign a hotkey to opening/closing Lua extensions.
There's currently no way to activate an extension without browsing around in the View menu.
This would make Lua extensions much more usable.
Change History (35)
comment:1 Changed 7 years ago by
| Component: | I don't know → LUA run-time |
|---|---|
| Owner: | changed from Rémi Denis-Courmont to Antoine Cellerier |
comment:2 Changed 7 years ago by
I'd like to develop some extensions for VLC. This sort of issue is probably the reason why there are so few.
Please consider a better way to access the extensions. I'd prefer hotkey support, but other UI options would be nice. Imagine if Firefox extensions were this limited.
Thanks.
comment:3 Changed 7 years ago by
| Owner: | changed from Antoine Cellerier to Jean-Philippe Andre |
|---|
We are not firefox. And extensions are very new, which explains why they are so few.
comment:4 Changed 6 years ago by
| Summary: | Hotkey support for Lua extensions → Hotkey and auto-load support for Lua extensions |
|---|
I agree that there should be hotkey support for extensions. It's annoying having to choose the same extension from the 'View' menu every time I start VLC.
Another solution would be to allow chosen extensions to auto-load when VLC starts. A "--no-extension-autoload" command-line flag could override this when buggy extensions cause VLC to crash on startup.
comment:5 Changed 6 years ago by
I would rather prefer we have auto-load support for Lua extensions instead, since that is what appears to be the demanded feature here. Also, it is already very easy to load an extension, just View -> Check off extensions.
By the way, Firefox does not have a hotkey option to enable and disable add-ons. Imagine hotkeying NoScript? on and off...
comment:6 Changed 6 years ago by
Yes, auto-load would be great.
Imagine if you had to go into the Firefox menu and enable each extension every time you opened the browser.
comment:7 Changed 5 years ago by
Just voted for the ticket and subscribed for changes.
VLC is keyboard-centric and super-multifunctional, so "no hotkeys for extensions" looks very strange.
Of course, partial workaroud is modify the source of extensions, adding hooks-callbacks on "key-pressed", but this way:
- Is not possible to attach to global hotkeys
- Impossible to customize hotkey by GUI.
comment:8 Changed 5 years ago by
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
Creating new hotkeys in the preferences does not seem realistic. There has to be a centralized list of actions with centralized defaults. This is needed for translations, and this is also needed to ensure the defaults do not clash with one another or with the Qt menus.
comment:9 follow-up: 28 Changed 5 years ago by
| Resolution: | wontfix |
|---|---|
| Status: | closed → reopened |
| Summary: | Hotkey and auto-load support for Lua extensions → Auto-load support for Lua extensions |
Auto-load might still be doable.
comment:10 Changed 5 years ago by
Now VLC looks for available scripts and inappropriate ones simply do not get in the list in VLC menu View. Then VLC could also check a presence of some setting placed directly in the script. Perhaps some command or global variable or some comment at the very beginning of an extension script could tell VLC, whether to start it automatically as soon as possible when starting VLC.
comment:12 follow-up: 24 Changed 5 years ago by
No, I think the user should decide whether to start an extension automatically. How about having two subdirectories beneath 'extensions', named 'automatic' and 'manual'? This would give users full control without requiring much coding by the VLC developers.
comment:13 Changed 5 years ago by
I agree. The idea about "automatic" subfolder might be better. Simply move script files in and out without necessity of any editing (".luac" compiled scripts).
comment:14 Changed 4 years ago by
If that was possible, we could for instance, automatically download a subtitle by just pressing a key and if it's not synchronized, just press it again. Also, opening an extension interface with a hotkey would be very helpful.
That would be awesome, can't wait to see it!
comment:15 follow-ups: 16 18 Changed 4 years ago by
I will have a go at this, I'll keep you guys posted about progress.
comment:16 Changed 4 years ago by
Replying to august bering:
I will have a go at this, I'll keep you guys posted about progress.
Cool.
comment:18 Changed 3 years ago by
Replying to august bering:
I will have a go at this, I'll keep you guys posted about progress.
Any updates?
comment:19 Changed 3 years ago by
No, sorry, I started looking at it but there is unfortunately not much stable support for "plugins" in the source code, so some work needs to be done to make sure any changes won't break as soon as some of the core devs decides to change something.
comment:20 Changed 3 years ago by
I think the best idea would be to implement this possible feature directly in the add-ons manager in the GUI: Tools > Plugins and extensions > Extensions tab: VLSub [ ] <<< autostart checkbox
comment:21 Changed 3 years ago by
And to remember filenames of ticked extensions in the "vlc-qt-interface.ini". Then to read the list of chosen extensions when starting VLC and activate appropriate ones if they are still available.
comment:22 Changed 3 years ago by
Can't an extension simply have an autostart option in its descriptor so it is activated right after it is loaded when this option is present? It is a pain in the neck to start an extension each time you start playing music. I use one to silent radio ads - imagine you turn adblock on each time you load new tab in a browser...
comment:24 Changed 3 years ago by
As I mentioned back in comment 12 (i.e. more than two years ago):
No, I think the user should decide whether to start an extension automatically. How about having two subdirectories beneath 'extensions', named 'automatic' and 'manual'? This would give users full control without requiring much coding by the VLC developers.
In my opinion, requiring users to edit extension scripts in order to enable/disable autostart is a really bad idea. Furthermore, I can't see how such a solution would be any easier for the developers than the one I've (twice) mentioned above.
comment:25 follow-up: 27 Changed 3 years ago by
descriptor is already read and available so it is at least a bit easier
comment:26 Changed 3 years ago by
I don't know about that. Either way, it would only require a single 'if' statement. If the extension is in the 'automatic' subdirectory, load it now. If the descriptor contains an autostart option, load it now.
This is why I wrote that I can't see how the second method is any easier to program than the first. Plus, it contains the major drawback of assuming that all VLC users know how to interpret/modify extension scripts.
comment:27 follow-up: 31 Changed 3 years ago by
Replying to krzysztof chodak:
descriptor is already read and available so it is at least a bit easier
As Xavion noted, most users wouldn't know (how) to edit the Lua script. And that assumes the script is not byte-compiled.
Also for reliability reasons, it is also highly desirable that resetting the VLC configuration disables all extensions. In other words, the list of automatically started extensions should be in the VLC configuration - not the scripts.
comment:28 Changed 3 years ago by
Replying to edwardw:
Auto-load might still be doable.
Yes but automatically loading extensions is an open door for poorly written extensions to bug the player, and for ill-intentioned extension writers to spread their crap.
Robustification of the extension module and insulation of the extensions were promised years ago when the original extension patch was posted. Unsurprisingly I am still waiting.
comment:29 Changed 3 years ago by
as i review the code briefly extension is handled externally so it maybe a plus to have it within its descriptor i really don't mind other options but if this proposal is a simple one liner i would go for it and not wait another two years for full blown nuclear-plant-secure method
comment:30 Changed 3 years ago by
Sorry, I was a bit short in my previous answer.
What should happen is the following:
- robustify the extensions modules,
- have a flag for extensions that mention that they can autoload,
- allow, at installation, for users to activate the autoloading of capable extensions,
- permit to activate/deactivate in the extensions dialog, the autoloading of options.
comment:31 Changed 3 years ago by
Replying to courmisch:
Also for reliability reasons, it is also highly desirable that resetting the VLC configuration disables all extensions. In other words, the list of automatically started extensions should be in the VLC configuration - not the scripts.
Yes but automatically loading extensions is an open door for poorly written extensions to bug the player, and for ill-intentioned extension writers to spread their crap.
Oops, I was forgetting that other extension writers generally don't take as much care as I do! I now agree that it's in the best interests of VLC for 'autoload' to be part of the configuration. Let's just hope it doesn't take the developers much longer to get moving on this.
comment:33 Changed 13 months ago by
| Summary: | Auto-load support for Lua extensions → Lua extensions: auto-load support |
|---|
If lua extensions were loaded like other lua scripts, this would already be available as a config variable.
comment:34 Changed 11 months ago by
I want to add my support to this ticket.
I'd like to run VLC automatically at system startup without a UI or optionally with the http interface, but to have the playlist under dynamic control of my Lua script.
I'm trying to create an audio "appliance" that starts automatically and runs unattended.
Thanks for considering.
comment:35 Changed 11 months ago by
You can run a Lua interface script at start up without fixing this bug. And you don't need it for your use case anyway.
So totally irrelevant.
This is unlikely to be implemented anytime soon if ever.