Hack to auto-load extensions?

Discuss your Lua playlist, album art and interface scripts.
user48235
New Cone
New Cone
Posts: 1
Joined: 10 Jul 2022 03:44

Hack to auto-load extensions?

Postby user48235 » 10 Jul 2022 04:06

I wrote an extension for tracking music playing stats using the input_changed() callback. However, it is pretty useless without auto-loading.

Everything I've found online has said that auto-loading extensions is not possible. Relevant issue that has not been fixed for 12 years: https://code.videolan.org/videolan/vlc/-/issues/3883

Now this is technically not true. It surely is possible, it just requires one of

(1) Patching VLC
(2) Writing a C helper plugin to do it
(3) Rewriting the extension as an interface and using polling (gross!) to recreate the functionality of the functions input_changed()

I've tried slogging through some existing extension code and the only one I've found is TraktForVLC which uses approach (3). It's probably going to take quite a few hours to rip and rewrite the relevant functionality out of that codebase, debug the likely fragile timer logic, and figure out how interface extensions work. Hopefully at the end obtaining a 'shim' that can be copy and pasted to the end of an extension to convert it into an interface. This lack of auto-loading is a huge pain point for extension developers and users so such a shim could be of great use.

Just wondering if someone has already made it using any of the three approaches before I reinvent the wheel?

Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 29 guests