feat: complete StreamTV remaining work — cache UI, tests, docs, cleanup#27
Open
roto31 wants to merge 10 commits into
Open
feat: complete StreamTV remaining work — cache UI, tests, docs, cleanup#27roto31 wants to merge 10 commits into
roto31 wants to merge 10 commits into
Conversation
Contributor
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
…ariants Applies the complete cache system (previously only in docker-compose) to every StreamTV deployment variant: macOS (priority), Linux, Windows, root, docker, kubernetes, and podman. All variants now have: - streamtv/cache/ package (cache_manager, archive_org_downloader, youtube_downloader, download_queue, download_scheduler) - streamtv/api/cache.py REST endpoints - streamtv/streaming/cache_first_stream_manager.py - Updated config.py, database/models.py, main.py, mpegts_streamer.py, api/__init__.py - requirements.txt: apscheduler>=3.10, internetarchive>=4.0 - config.example.yaml: cache section with annotated examples https://claude.ai/code/session_01KpHjxJt9VnasH1w7EFzyp4
…lan for Cursor AI Comprehensive reference document covering: - Complete current architecture (API endpoints, DB models, streaming pipeline) - Full configuration reference with all 15 config sections - Download-first cache system documentation (completed work) - 12 remaining tasks with exact file paths, code, and implementation steps - Quick-start checklist for Cursor AI pickup - Distribution sync instructions https://claude.ai/code/session_01KpHjxJt9VnasH1w7EFzyp4
…reaming, importers, middleware, validation Co-authored-by: roto31 <roto31@users.noreply.github.com>
Co-authored-by: roto31 <roto31@users.noreply.github.com>
Co-authored-by: roto31 <roto31@users.noreply.github.com>
…ytest.ini Co-authored-by: roto31 <roto31@users.noreply.github.com>
Co-authored-by: roto31 <roto31@users.noreply.github.com>
Co-authored-by: roto31 <roto31@users.noreply.github.com>
…tests Co-authored-by: roto31 <roto31@users.noreply.github.com>
9b56c28 to
bf346ea
Compare
…, path traversal guard - CWE-20 (Incomplete URL substring sanitization): replace all 'domain.com' in url substring checks with urllib.parse hostname comparisons in: cache/download_scheduler.py, cache/youtube_downloader.py, importers/channel_importer.py, streaming/mpegts_streamer.py - CWE-79 (Reflected XSS): html.escape() on schedule_id in main.py HTMLResponse fallback - CWE-22 (Path traversal): Path(file_path).resolve() + relative_to(cwd) guard in api/import_api.py before any filesystem operations on user-supplied path Synced fixes to all 7 distribution variants via sync_distributions.py Co-authored-by: roto31 <roto31@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes all Priority 1 and Priority 2 items from the StreamTV architecture document, based on the
claude/vigilant-wright-6k8ygafeature branch (which contains the download-first cache backend).Commits
chore* 2.py/* 2.htmlbackup files fromapi/,templates/,streaming/,importers/,middleware/,validation/featstreamtv/templates/cache.html),/cacheroute inmain.py, and "Cache" nav link inbase.htmlsidebarfeatstreamtv/utils/swiftdialog_credentials.py(macOS SwiftDialog credential provider withprompt_credentials,show_notification,prompt_text) and fix TVDB year filter TODO inmetadata_providers.pytesttests/conftest.py,test_cache_manager.py(10 tests),test_api_cache.py(9 tests),test_streaming_adapters.py(8 tests) — 27/27 passingfeatAutoHealerintomain.pylifespan startup/shutdown; wire metadata enrichment viacreate_metadata_manager()inchannel_importer.pyafterMediaItemcreationdocsdocs/ARCHITECTURE.mdwith 17 Mermaid diagrams covering every subsystem; link fromREADME.md; update.gitignoreto trackdocs/choresync_distributions.py(65 paths → 7 platform variants); clean stale duplicate files from all distribution dirsArchitecture Diagrams Added (17 total)
Test Results
test_cache_manager.py— cache miss, hit, TTL eviction, LRU eviction, download pending checktest_api_cache.py— REST endpoint status codes (503 when cache disabled, 404 guards)test_streaming_adapters.py— CacheFirstStreamManager hit/miss/disabled/non-cacheable, SwiftDialog no-op on non-macOSFiles Changed
streamtv/templates/cache.html— newstreamtv/templates/base.html— Cache nav linkstreamtv/main.py—/cacheroute, AutoHealer lifespan wiringstreamtv/utils/swiftdialog_credentials.py— implementedstreamtv/utils/metadata_providers.py— TVDB year filterstreamtv/importers/channel_importer.py— metadata enrichment hooktests/conftest.py,tests/test_cache_manager.py,tests/test_api_cache.py,tests/test_streaming_adapters.py— newpytest.ini— newrequirements.txt— added pytest/asyncio/cov dev depsdocs/ARCHITECTURE.md— new (17 diagrams)README.md— Architecture section link.gitignore— allowdocs/ARCHITECTURE.md