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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user