player: log last DLNA URL to /tmp/dlna_last_url.txt on play(); tests: auto-load it in diagnostic script

This commit is contained in:
Matteo Benedetto
2026-03-23 23:50:11 +01:00
parent 79a1c9a78c
commit 6715f4b227
2 changed files with 16 additions and 1 deletions
+11 -1
View File
@@ -218,11 +218,21 @@ if not audio_ok:
test_url = sys.argv[1] if len(sys.argv) > 1 else None
if not test_url:
try:
with open("/tmp/dlna_last_url.txt") as _f:
test_url = _f.read().strip() or None
if test_url:
print(f"\n [auto] Loaded last DLNA URL from /tmp/dlna_last_url.txt")
except FileNotFoundError:
pass
_section("6. Live URL / file playback")
if not test_url:
_warn("No URL provided — skipping live playback test.")
print(" Pass a media URL or path as the first argument to test real decode.")
print(" Pass a media URL or path as the first argument, or start the app and")
print(" play something; the URL will be saved to /tmp/dlna_last_url.txt.")
else:
print(f" URL: {test_url}")
live_frames = 0