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')

View file

@ -45,7 +45,7 @@ def main():
screenshot('details-cast-restored')
results.append('Actor titles match both Plex libraries; title and cast focus restore');print('PASS '+results[-1],flush=True)
key(4);key(4);focused('Home');key(22,2);focused('TV Shows');key(20);focused('Discover');key(22);focused('Library');key(23)
wait(lambda r:any(x.startswith('All genres') for x in labels(r)),'Show library filters loaded');focused('Library');key(20)
wait(lambda r:any(x.startswith('Unwatched') for x in labels(r)),'Show library filters loaded');focused('Library');key(20)
if show['title'] not in focus(snapshot()):key(21)
focused(show['title']);key(23)
text('Seasons');focused('Watch next');text('Mark watched');key(22);focused('Mark watched');touched.add(SHOW);key(23);focused('Mark unwatched')

View file

@ -4,9 +4,9 @@ from device import screenshot
from verify_ui import launch,key,focused,wait,focus,labels,snapshot
launch();key(22,2);focused('TV Shows');key(20);focused('Discover');key(22);focused('Library');key(23)
wait(lambda r:any(x.startswith('All genres') for x in labels(r)),'Show library loaded');focused('Library');key(20)
wait(lambda r:any(x.startswith('Unwatched') for x in labels(r)),'Show library loaded');focused('Library');key(20)
# The genre/sort filters sit between the section tabs and the grid.
if 'All genres' in focus(snapshot()):key(20)
if focus(snapshot()).startswith('Unwatched'):key(20)
# The grid is entered beneath the filter that held focus; walk back to the first column.
for _ in range(6):
if '3 Body Problem' in focus(snapshot()):break

View file

@ -58,7 +58,7 @@ def section_check(tab,media_type):
for _ in range(8):
if focus(snapshot())=='Animation':break
key(22)
focused('Animation');key(23);text('Animation ⌄');text('Z')
focused('Animation');key(23);text('Z')
expected,offset=first_at_letter('',media_type,'S','Animation')
jump('S',expected)
screenshot('030-'+media_type+'-animation-jump')

View file

@ -4,11 +4,11 @@ from device import screenshot
from verify_ui import launch,key,focused,wait,focus,labels,snapshot
launch();key(22);focused('Movies');key(20);focused('Discover');key(22);focused('Library');key(23)
wait(lambda r:any(x.startswith('All genres') for x in labels(r)),'Movie library loaded')
wait(lambda r:any(x.startswith('Unwatched') for x in labels(r)),'Movie library loaded')
key(20)
# The genre/sort filters sit between the section tabs and the grid.
if 'All genres' in focus(snapshot()):key(20)
wait(lambda r:bool(focus(r)) and focus(r) not in ('Library','Discover') and 'All genres' not in focus(r),'Movie card focus')
if focus(snapshot()).startswith('Unwatched'):key(20)
wait(lambda r:bool(focus(r)) and focus(r) not in ('Library','Discover') and not focus(r).startswith('Unwatched'),'Movie card focus')
selected=focus(snapshot());key(23)
wait(lambda r:focus(r)=='Play' or focus(r).startswith('Resume'),'Movie play action')
root=snapshot();screenshot('movie-details-0.1.11')

View file

@ -47,7 +47,7 @@ def browse():
key(4);focused(selected);passed('Discovery details returns to the same focused card')
key(19);wait(lambda r:focus(r) in ('Play','Resume'),'Return to Home hero');key(19);focused('Home');key(22);text('Recently released');focused('Movies')
capture('movies-discover');key(20);focused('Discover');key(22);focused('Library');key(23)
text('All genres ⌄');focused('Library');capture('movies-library')
wait(lambda r:any(x.startswith('Unwatched') for x in labels(r)),'Library filters');focused('Library');capture('movies-library')
passed('Movies prioritizes recent releases and retains a separate filtered A-Z grid')
key(20);wait(lambda r:bool(focus(r)) and 'Library' not in focus(r),'Library content or filter focus')
key(4);focused('Discover');key(19);focused('Movies');key(22)