feat: error visibility, already-downloaded status, PWA, mobile UI, and .env-based Docker setup#6
Open
QuantumFF wants to merge 10 commits into
Open
feat: error visibility, already-downloaded status, PWA, mobile UI, and .env-based Docker setup#6QuantumFF wants to merge 10 commits into
QuantumFF wants to merge 10 commits into
Conversation
This reverts commit b91d150.
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.
Fix silent download failures, add already-downloaded detection, PWA support, mobile UI, and portable Docker configuration
Important
This PR is entirely written by claude code.
Summary
This PR fixes downloads failing silently when running outside Docker, surfaces rip errors that were previously swallowed, adds proper handling for music already in streamrip's database, makes the app installable as a PWA, optimises the UI for mobile viewports, and reworks the Docker configuration so one streamrip config (and one downloads database) works identically on the host and in the container.
Problem
Running
python app.pydirectly on the host made every download fail instantly with no visible reason. Root cause: the default paths (/config/config.toml,/music) are Docker-internal — on a host,ripdies withPermissionError: Permission denied: '/music'before transferring a byte. The failure was invisible because the worker captured rip's output but never logged it server-side, and the UI discarded it.Separately: re-downloading something already in streamrip's database silently fetched only the cover art but reported
COMPLETED, and the Docker setup required hand-editing absolute paths inside the container'sconfig.toml.Changes
Fix: sensible local defaults + loud failures (
app.py)~/.config/streamrip/config.tomland~/Music(Docker still overrides both via environment variables)DOWNLOAD_DIRcan't be created or written, the app logs a prominent error at boot instead of failing per-downloadFeature: already-downloaded detection (
app.py,app.js,style.css)Skipping track N. Marked as downloaded in the database.) and downloads nothing, the item is reported asskippedinstead ofcompletedcompletedFeature: PWA support (
manifest.json,sw.js,app.py,index.html,app.js)/api/*so the SSE event stream and POSTs always hit the network directly/sw.jsvia a new Flask route so its scope covers the whole appFeature: mobile viewport support (
style.css,index.html)Fix: portable Docker configuration (
docker-compose.yml,.env.example,.gitignore)docker-compose.ymlno longer contains machine-specific paths — all deployment values come from.env(CONFIG_DIR,MUSIC_DIR,PUID/PGID,PORT,MAX_CONCURRENT_DOWNLOADS)config.toml(downloads database, folders) stay valid everywhere — no more in-container path surgeryripCLI, and Docker now share one config and one downloads database, keeping already-downloaded detection consistentdocker-compose.ymlis tracked again;.envis gitignored;.env.exampledocuments the knobsDocs (
README.md).env→ local run → PWA install → usage → troubleshootingsedpath-fix recipeTesting
rip -f /music ...→PermissionError), then verified end-to-end through the running app: real Qobuz track download completes, SSE reportscompletedDOWNLOAD_DIRskipped, a fresh track reportscompleted, and skips are logged server-side/sw.js, manifest, icons) serve with correct content types; JS/JSON syntax-checkeddocker compose configresolves all.envinterpolations correctlyNotes for reviewers
localhostor HTTPS (browser secure-context rule) — documented in the READMECACHE_NAMEonly when changing SW logic itself