Remove volume boost, honour server-stopped streams, drop the Library genre filter

Work already pending in the tree before the bug-fix pass, committed on its own:
- Remove Volume boost (it degraded audio) and its setting; keep passthrough.
- Leave playback with the server's reason when Plex stops a session
  (timeline terminationCode/terminationText); never fall back or reconnect after.
- Genre filtering lives in Categories; the Library grid lists the whole section.
- Update UI verification scripts and AGENTS.md accordingly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-04 22:52:52 -07:00
parent 0ee43ffa76
commit 4780bdcdb2
17 changed files with 89 additions and 127 deletions

View file

@ -1,4 +1,4 @@
"""Validate optional themes and PCM boost on the authorized onn; restore the prior audio preferences."""
"""Validate optional themes and the normal audio path on the authorized onn; restore the prior audio preferences."""
import re,time,sys,xml.etree.ElementTree as ET
from device import adb,OUT,screenshot
from verify_ui import launch,key,text,focused,focus,snapshot,labels,wait,passed
@ -38,7 +38,7 @@ if __name__=='__main__':
original_xml=adb('shell','run-as','tv.kaleido.app','cat','shared_prefs/preferences.xml')
(OUT/'030-audio-original-preferences.xml').write_bytes(original_xml)
tree=ET.fromstring(original_xml)
for name,kind,value in [('themeMusic','boolean','true'),('themeVolume','int','20'),('volumeBoostDb','int','6')]:
for name,kind,value in [('themeMusic','boolean','true'),('themeVolume','int','20')]:
node=next((n for n in tree if n.get('name')==name),None)
if node is None:node=ET.SubElement(tree,kind,{'name':name})
node.set('value',value)
@ -51,14 +51,10 @@ if __name__=='__main__':
key(20);focused('Theme music volume')
original_volume=re.search(r'(\d+)%$',focus(snapshot())).group(1)+'%'
choose([str(n)+'%' for n in range(10,101,10)],'20%');focused('Theme music volume')
settings(1);focused('Playback quality');key(20,6);focused('Volume boost')
current=focus(snapshot());original_boost='Off (+0 dB)' if current.endswith('Off (+0 dB)') else re.search(r'\+\d+ dB$',current).group()
choose(['Off (+0 dB)','+3 dB','+6 dB','+9 dB','+12 dB'],'+6 dB');focused('Volume boost')
screenshot('030-volume-boost')
settings(3);key(20);focused('Theme music');assert focus(snapshot()).endswith('On')
key(20);focused('Theme music volume');assert focus(snapshot()).endswith('20%')
screenshot('030-theme-settings')
passed('Theme toggle, theme volume and boost persist through cold starts; dialogs restore focus')
passed('Theme toggle and theme volume persist through cold starts; dialogs restore focus')
try:
adb('logcat','-c');open_silo();wait_log('KaleidoTheme: READY volume=20%')
screenshot('030-silo-theme')
@ -76,24 +72,24 @@ if __name__=='__main__':
# Actual video uses validation mode, which avoids changing Plex progress.
adb('logcat','-c')
adb('shell','am','start','-n','tv.kaleido.app/.MainActivity','--es','testTitleId','7599','--el','testOffset','90000','--ei','testMode','0','--ez','testValidation','true')
wait_log('STOP');wait_log('BOOST processing PCM db=6');wait_log('READY item=7599')
wait_log('STOP');wait_log('READY item=7599')
time.sleep(4)
audit=adb('shell','run-as','tv.kaleido.app','cat','files/playback-validation.jsonl')
(OUT/'030-boost-validation.jsonl').write_bytes(audit)
(OUT/'030-audio-validation.jsonl').write_bytes(audit)
import json
events=[json.loads(line) for line in audit.decode().splitlines()]
assert any(e.get('event')=='audioAdvancing' for e in events),'Decoded audio must advance'
assert any(e.get('event')=='firstFrame' for e in events),'Video must render'
passed('Theme stops for actual video; +6 dB processor receives decoded PCM and audio/video advance')
passed('Theme stops for actual video; audio and video advance')
adb('shell','am','force-stop','tv.kaleido.app');adb('logcat','-c')
adb('shell','am','start','-n','tv.kaleido.app/.MainActivity','--es','testTitleId','9776','--el','testOffset','90000','--ei','testMode','2','--ez','testValidation','true')
wait_log('BOOST processing PCM db=6');wait_log('READY item=9776');time.sleep(4)
wait_log('READY item=9776');time.sleep(4)
movie_audit=adb('shell','run-as','tv.kaleido.app','cat','files/playback-validation.jsonl')
(OUT/'030-boost-movie-validation.jsonl').write_bytes(movie_audit)
(OUT/'030-audio-movie-validation.jsonl').write_bytes(movie_audit)
movie_events=[json.loads(line) for line in movie_audit.decode().splitlines()]
assert any(e.get('event')=='audioAdvancing' for e in movie_events)
assert any(e.get('event')=='firstFrame' for e in movie_events)
passed('Volume boost also processes a real Plex-converted movie with rendered audio/video')
passed('A real Plex-converted movie renders audio and video')
adb('shell','am','force-stop','tv.kaleido.app')
finally:
if playback_only:
@ -101,11 +97,9 @@ if __name__=='__main__':
adb('shell','run-as','tv.kaleido.app','sh','-c','"cat > shared_prefs/preferences.xml"',data=original_xml)
assert adb('shell','run-as','tv.kaleido.app','cat','shared_prefs/preferences.xml')==original_xml
else:
settings(1);key(20,6);focused('Volume boost')
choose(['Off (+0 dB)','+3 dB','+6 dB','+9 dB','+12 dB'],original_boost)
settings(3);key(20);focused('Theme music')
if focus(snapshot()).endswith('On')!=original_on:key(23)
key(20);focused('Theme music volume');choose([str(n)+'%' for n in range(10,101,10)],original_volume)
launch()
(OUT/'030-audio.log').write_text(logs())
passed('Prior theme and boost preferences restored; device returned to Home')
passed('Prior theme preferences restored; device returned to Home')