huge refactor of plugin system
This commit is contained in:
@@ -18,8 +18,8 @@ UOSC defines its own right-click menu, and there's no straightforward way to ove
|
||||
3. **Right-click** - Attempts to trigger via input.conf, but UOSC overrides (needs investigation)
|
||||
|
||||
### How It Works
|
||||
- `MPV/portable_config/input.conf` routes keybindings to Lua handlers
|
||||
- `MPV/LUA/main.lua`:
|
||||
- `plugins/mpv/portable_config/input.conf` routes keybindings to Lua handlers
|
||||
- `plugins/mpv/LUA/main.lua`:
|
||||
- Registers script message handler: `medios-show-menu`
|
||||
- Registers Lua keybindings for 'm' and 'z' keys
|
||||
- Both route to `M.show_menu()` which opens an UOSC menu with items
|
||||
@@ -35,25 +35,25 @@ The menu calls UOSC's `open-menu` handler with JSON containing:
|
||||
- Start Helper (if not running)
|
||||
|
||||
## Files Modified
|
||||
- `MPV/LUA/main.lua`:
|
||||
- `plugins/mpv/LUA/main.lua`:
|
||||
- Fixed Lua syntax error (extra `end)`)
|
||||
- Added comprehensive `[MENU]` and `[KEY]` logging
|
||||
- Added 'm' and 'z' keybindings
|
||||
- Added `medios-show-menu` script message handler
|
||||
- Enhanced `M.show_menu()` with dual methods to call UOSC
|
||||
|
||||
- `MPV/portable_config/input.conf`:
|
||||
- `plugins/mpv/portable_config/input.conf`:
|
||||
- Routes `mbtn_right` to `script-message medios-show-menu`
|
||||
- Routes 'm' key to `script-message medios-show-menu`
|
||||
|
||||
- `MPV/portable_config/mpv.conf`:
|
||||
- `plugins/mpv/portable_config/mpv.conf`:
|
||||
- Fixed `audio-display` setting (was invalid `yes`, now `no`)
|
||||
|
||||
## Testing
|
||||
Run: `python test_menu.py`
|
||||
|
||||
Or manually:
|
||||
1. Start MPV with: `mpv --script=MPV/LUA/main.lua --config-dir=MPV/portable_config --idle`
|
||||
1. Start MPV with: `mpv --script=plugins/mpv/LUA/main.lua --config-dir=plugins/mpv/portable_config --idle`
|
||||
2. Press 'm' or 'z' key
|
||||
3. Check logs at `Log/medeia-mpv-lua.log` for `[MENU]` entries
|
||||
|
||||
|
||||
Reference in New Issue
Block a user