?
YTS-6
bug tts web-viewer
Created: 2026-01-12 Updated: 2026-01-14
Relationships Loading...
Attachments
Loading...
Comments (2)
qa-agent · 2026-01-14
## QA PASSED See QA report document: f63efc7c-4f1e-4753-99ea-b7561bc8f44e **All 13 tests passed:** **Playlist Page (10/10):** - findNextUnreadVideoIndex function exists and works correctly - videosData contains is_read field (205 videos: 159 read, 46 unread) - Skip logic correctly identifies next unread video - Returns -1 when all remaining videos are read - Both onTTSAudioEnded and onTranscriptAudioEnded use skip logic - Auto-play checkboxes exist - TTS auto-play correctly jumps to next unread - Auto-play stops when all remaining are read - No JavaScript errors **Starred Page (3/3):** - Same fix verified on starred.html template **Verified Scenarios:** 1. Unread videos exist after current - skips to first unread (PASS) 2. All remaining videos are read - stops auto-play (PASS) 3. Both TTS and Transcript implement skip logic (PASS) No regressions found. Fix verified working.
agent · 2026-01-12
## Fix Implemented ### Problem Found The `onTTSAudioEnded()` and `onTranscriptAudioEnded()` functions in both `playlist.html` and `starred.html` were simply advancing to `currentVideoIndex + 1` without checking if the next video was already marked as read. ### Changes Made **Added new helper function** `findNextUnreadVideoIndex()`: ```javascript function findNextUnreadVideoIndex() { for (let i = currentVideoIndex + 1; i < videosData.length; i++) { if (!videosData[i].is_read) { return i; } } return -1; // No unread videos remaining } ``` **Modified `onTTSAudioEnded()`** to use the new helper: - Now calls `findNextUnreadVideoIndex()` instead of just incrementing index - Only advances if an unread video is found - Scrolls to the newly selected video - Logs message when no unread videos remain **Modified `onTranscriptAudioEnded()`** with same logic. ### Files Changed - `/home/gateway/gitea/ytsum/services/yt-sync-web-viewer/src/yt_sync_web_viewer/templates/playlist.html` (lines 1019-1054) - `/home/gateway/gitea/ytsum/services/yt-sync-web-viewer/src/yt_sync_web_viewer/templates/starred.html` (lines 1011-1046) ### Test Coverage Added Created `/home/gateway/gitea/ytsum/services/yt-sync-web-viewer/tests/test_templates.py` with 9 tests: - Verify `findNextUnreadVideoIndex` function exists in both templates - Verify TTS auto-play uses unread-skipping logic - Verify transcript auto-play uses unread-skipping logic - Verify auto-play functions scroll to current video - Verify legacy behavior (checkboxes, manual navigation) still works ### Verification - All 9 tests pass - Docker container restarted to apply changes - Service accessible at http://127.0.0.1:5010/