feat(client): initial implementation of jellyfin htpc client with yatse remote and youtube playback

This commit is contained in:
bart
2026-11-02 21:33:42 +01:00
parent 8d6270038f
commit f66f874bae
23 changed files with 2246 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
import tempfile
from pathlib import Path
from src.config import AppConfig
def test_default_config():
cfg = AppConfig.load()
assert cfg.jellyfin.client_name == "Jellyfin HTPC Client"
assert cfg.player.hwdec == "auto"
assert cfg.kodi_rpc.http_port == 8080
assert cfg.web_api.port == 8097
def test_custom_yaml_config():
yaml_content = """
jellyfin:
server_url: "https://media.lan"
username: "myuser"
password: "mypassword"
player:
hwdec: "vaapi"
fullscreen: false
kodi_rpc:
http_port: 8088
"""
with tempfile.NamedTemporaryFile("w", suffix=".yaml", delete=False) as f:
f.write(yaml_content)
f_path = f.name
try:
cfg = AppConfig.load(f_path)
assert cfg.jellyfin.server_url == "https://media.lan"
assert cfg.jellyfin.username == "myuser"
assert cfg.player.hwdec == "vaapi"
assert cfg.player.fullscreen is False
assert cfg.kodi_rpc.http_port == 8088
finally:
Path(f_path).unlink()