Commit Graph
568 Commits
Author SHA1 Message Date
austinried 487296e75e library: stop download writes from invalidating the browse lists
The album/artist/playlist paging SQL named song_downloads, so Room
invalidated the pages on every download progress tick, janking the list
and resetting scroll when a download started. Route the default (filter
off) path through a raw query that only observes its own table; the
downloaded/offline path keeps the download-aware queries.
2026-10-04 00:30:07 +00:00
austinried adc206337b settings: add icons to Manage downloads and Licenses 2026-10-04 00:30:07 +00:00
austinried 0cd6f30c88 address review: keep the notification tap when the activity is recreated 2026-10-04 00:30:07 +00:00
austinried b3cad97869 address review: signal now playing with an event flow, not an int 2026-10-04 00:30:07 +00:00
austinried fd3b1ce298 address review: keep notification taps working after recreation 2026-10-04 00:30:07 +00:00
austinried 46ab8f66c4 open now playing when the media notification is tapped 2026-10-04 00:30:07 +00:00
austinried 6eb23445f1 limit the home downloaded-songs preview in SQL 2026-10-04 00:30:07 +00:00
austinried 5dce881704 use the auto-mirrored TrendingUp icon 2026-10-04 00:30:06 +00:00
austinried 3e260aa170 address review: dedupe and trim genres, add a starred queue reference, fix the offline source switch 2026-10-04 00:30:06 +00:00
austinried 4779bfc88b keep playback running when offline mode is toggled, and swap the recently-added header icon 2026-10-04 00:30:06 +00:00
austinried bf180ef711 home: put a relevant icon on each section header 2026-10-04 00:30:06 +00:00
austinried 2061ebafca keep playback running when rebuilding the offline window, and order downloads newest-first 2026-10-04 00:30:06 +00:00
austinried 8848e951e4 play genres and downloads as lazy queue references instead of expanding every song 2026-10-04 00:30:06 +00:00
austinried adbd3b8d8e normalize every song's genres into song_genres and simplify the genre queries 2026-10-04 00:30:06 +00:00
austinried 3df16826e6 home: paginate the offline lists and add More to each downloaded section 2026-10-04 00:30:06 +00:00
austinried c44987ff31 home: swap to downloaded sections in offline mode 2026-10-04 00:30:06 +00:00
austinried 43c90c3453 home: tighten the genre chip rows 2026-10-04 00:30:06 +00:00
austinried d9aa18c37a home: play the whole genre list from a genre song row 2026-10-04 00:30:06 +00:00
austinried f62e8363de home: drop On repeat, restore starred, give artist lists the detail column 2026-10-04 00:30:06 +00:00
austinried e36a0e3de5 home: add an On repeat song row and move recently starred below genres 2026-10-04 00:30:06 +00:00
austinried b0a31d0291 home: show album more screens as lists with a section-relevant detail column 2026-10-04 00:30:06 +00:00
austinried 53aa0f71b3 home: add a little content gap and more space between sections 2026-10-04 00:30:06 +00:00
austinried 0bb7f684ba home: align the starred song rows with the image rows 2026-10-04 00:30:06 +00:00
austinried 27f2d752be home: normal-weight section headers flush with their content 2026-10-04 00:30:06 +00:00
austinried 50fab1566e home: smaller bold section headers with a tighter gap 2026-10-04 00:30:06 +00:00
austinried 141529d139 home: bold the section headers and tighten the header-to-content gap 2026-10-04 00:30:06 +00:00
austinried b62d6c13c9 home: larger section headers and even header-to-content spacing 2026-10-04 00:30:06 +00:00
austinried 4fff637699 home: bold headline wordmark with roomier top spacing 2026-10-04 00:30:06 +00:00
austinried e2c0511338 home: add the subtracks wordmark, brick-pack the genres in three scrollable rows, centre artist names 2026-10-04 00:30:06 +00:00
austinried ff236836a2 home polish: genres by most played in a wrapping flow, tighter album corners, spaced left-aligned artists 2026-10-04 00:30:06 +00:00
austinried 796e5e2827 queue the whole starred list from both starred song lists 2026-10-04 00:30:06 +00:00
austinried 3affe7e049 play the starred list from the home row, and reorder the home sections 2026-10-04 00:30:06 +00:00
austinried 82b62b8d9d fix the home tab text colour against the dark theme 2026-10-04 00:30:06 +00:00
austinried 378d6a3b47 add a home tab with local recommendation rows 2026-10-04 00:30:06 +00:00
austinried 111078353d trust user-installed CAs for self-signed servers
Port the Flutter app's network security config: add a base-config that trusts system and user certificate anchors and permits cleartext, and reference it from the application manifest. android:usesCleartextTraffic is now redundant and removed.
2026-10-04 00:30:06 +00:00
austinried c857d5e910 record genre support in the integration test fixture
The Nextcloud genre exception was a comment; express it as a TestServer
capability instead, mirroring supportsTokenAuth.
2026-10-04 00:30:06 +00:00
austinried 26f58b7502 address review: share the test helpers, guard AppModuleTest cleanup
Use cancelAndJoinBlocking in the repo tests and AppModuleTest instead of hand-rolled runBlocking joins, put AppModuleTest's cleanup in a finally so a failed join cannot leave Main overridden and Koin started, and collapse the five polling await copies into one awaitUntil. upcomingItem now reads the queue snapshot under the lock but does the Room read outside it.
2026-10-04 00:30:06 +00:00
austinried 88b53821bd let tests own the worker coroutine scopes
The repositories and the playback controller each created a hidden SupervisorJob scope and exposed close() only so tests could join it before closing the DB; production never called close(). Inject the scope instead and have each test cancel and join the scope it passes, so no test-only teardown lives in the app. Koin now provides the app/io/playback scopes.

Also read upcomingItem under the controller lock, and give the wall-clock test waits one shared 30s budget instead of 5s per file: a loaded runner could starve the controller's single thread past the old deadline.
2026-10-04 00:30:06 +00:00
austinried 18dc929218 store multiple OpenSubsonic song genres
OpenSubsonic servers return a per-song <genres> array that was dropped,
leaving every song with only its first (or joined) legacy genre. Parse it
and store the ordered list in a song_genres table, keeping the single
genre column as the fallback for base Subsonic servers.

Album genres are derived by unioning the album's song genres, falling
back to the single song genre, so album-level genre never trusts the
per-server album genres[] behaviour.

Schema 21 -> 22, with parser, sync, unit and integration coverage.
2026-10-04 00:30:06 +00:00
austinried 010aa6d122 stop prefetching the next track's full artwork 2026-10-04 00:30:05 +00:00
austinried 4d4eb7b758 address review: count a play even when its scrobble fails
A submitted scrobble now counts locally regardless of the HTTP result
(offline already did), so a transient server error no longer drops the
play from the sorts. Last-played uses MAX(existing, at) so a backwards
clock step cannot move an album or artist back down the list.
2026-10-04 00:30:05 +00:00
austinried 95ac4ae6ce drop the sort auto-reset
It compared a possibly stale listQuery (the previous tab's value during a
tab switch) against the new tab's options and rewrote the new tab's query
to its default, so sorts appeared to reset. Not worth the fragility for a
hidden-option edge case.
2026-10-04 00:30:05 +00:00
austinried d3aaeca405 count a play locally when it is scrobbled
A submitted scrobble now bumps the song's playCount/played and its album
and artist ranks, so the play sorts move without waiting for a sync. The
sync then overwrites them with the server's own numbers, so the
increment cannot double-count.
2026-10-04 00:30:05 +00:00
austinried 06ca2da48d add frequently and recently played album and artist sorts
Song playCount/played are parsed and synced, then aggregated per album
(SUM/MAX) and per artist (through the album's artistId) after the song
sync. Albums and artists gain Frequent/Recent sorts with their own
indices; the options show only when the active source returned the
fields, and the aggregate only writes rows whose value changed.

The artist subqueries pin index_albums_sourceId_artistId: without it the
planner answers MAX(played) from index_albums_recent (sourceId, played),
which cannot apply the artistId equality, and scans every album once per
artist. The availability flows read the indexed album ranks rather than
scanning songs, which would re-run on every song-sync batch.
2026-10-04 00:30:05 +00:00
austinried a261612017 fade cover art over the letter placeholder and lift CJK initials 2026-10-04 00:30:05 +00:00
austinried 1128af165d address review: join the controller scope, keep DB closes where nothing leaks
PlaybackController.now exposes awaitStopped() so the tests that own its DB can join its scope before db.close(); close() stays cancel-only so AppModuleTest (Main dispatcher) cannot deadlock. Restores db.close() in the tests that have no leaking scope, closes the SyncManager AddSourceViewModelTest was leaking, replaces the duplicated poll with the existing awaitCoverArt helper, and trims the testLogging block to the one line that does anything.
2026-10-04 00:30:05 +00:00
austinried 84df71771e stop poisoning the unit suite from Room teardown races
The ThemeTest failure was cross-test contamination, not a theme bug. A Room invalidation-tracker query keeps running on a cancelled flow collector after the in-memory DB is closed or finalised, throws "no such table: sources", and kotlinx-coroutines-test records it and fails the next Compose test with UncaughtExceptionsBeforeTest. Which test it lands on is just ordering/load luck.

Close repositories the way DownloadRepository already did: cancel and join the scope, so Room work cannot outlive close. Stop closing the in-memory test DBs; the DB is dropped and collected once the test releases it, instead of being torn down under a pending query. Wait for the stored ref in offlineModeStillServesDownloadedArtwork instead of asserting once, since it was waiting on a different flow than the state coverArt reads. Print full stack traces for failed tests in CI.
2026-10-04 00:30:05 +00:00
austinried 592c522244 tidy the integration harness and its comments
Trim the explanatory comments to short quirk notes, drop the module headers, and fail cleanly: navidrome/gonic now kill their process if they never become ready and the entrypoint always tears down. The prune test waits for the removal to appear in the album list rather than for the scan flag. Correct the AGENTS token-auth note (lms answers 42, Nextcloud 41) and give CI more headroom.
2026-10-04 00:30:05 +00:00
austinried d635f3b9a0 cover lms and nextcloud music in the integration suite
Run the integration harness from its own devshell so the server packages stay out of the everyday shell. Add lms and a Nextcloud Music instance to the harness and extend the suite with auth-fallback, media, error, write round-trip, multi-source and prune tests.

The auth test caught that lms answers OpenSubsonic error 42 (not 41) when it refuses token auth, so the client now falls back on both codes.
2026-10-04 00:30:05 +00:00
austinried edb1eb8a68 generate third-party licenses at build and show them from settings
Add AboutLibraries, whose Android Gradle plugin collects the licence and
attribution of every dependency into a generated resource at build time,
and surface it under a new About section in Settings.
2026-10-04 00:30:05 +00:00