feat(extras): add a reference Linux VLC playback agent - #817
Draft
SHAREN wants to merge 4 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Remote playback devices are only useful when there is a simple agent to install on the computer connected to the TV.
This adds a small reference Linux agent that implements the playback-device contract from the previous PR. It lives under
extras/, so TorrServer itself gains no Python or VLC runtime dependency.What it does
GET /healthandPOST /play.--no-one-instance, keeping the launched process owned and manageable by the agent.shell=False.Fullscreen handling
The
/playrequest contains:{ "fullscreen": false }The agent appends one final explicit VLC option:
--no-fullscreenwhen the value is false or omitted;--fullscreenwhen the value is true.The final flag is placed after configured player arguments, so a user's saved device checkbox has an unambiguous result. Existing/older requests without the field open VLC normally.
Request validation
Before opening VLC, the agent verifies that:
pathis a safe filename;hashis a 40-character torrent hash;indexis a valid file index;fullscreenis a boolean when present;stream_urluses HTTP or HTTPS;playparameter match the request;Safe defaults
127.0.0.1by default.0600.Installation
cd extras/vlc-agent ./install-user-service.sh --listen-lan --allowed-host 192.168.1.10The README explains how to register the generated agent URL and token in TorrServer and how to handle desktop-session variables on Wayland/X11 systems.
Compatibility
fullscreenremain valid and open a normal VLC window.Tested
Seven Python unit/integration tests cover:
--fullscreen/--no-fullscreenCLI placement;Additional checks:
python3 -m py_compilesh -n install-user-service.shsystemd-analyze verify0600;--fullscreenoption written.