Commit Graph
15 Commits
Author SHA1 Message Date
mattandClaude Sonnet 5.5 c5eeb4e1d2 Add ACRCloud recognizer and encrypted recognition config
AcrCloudRecognizer calls the HTTP identify API (HMAC-SHA1 signed multipart
with a WAV-wrapped clip) and maps results, including MusicBrainz ids when
present and actionable errors for bad keys, limits and no match. Config is
stored encrypted via a shared KeystoreBox extracted from the credential
store (existing installs stay signed in).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 12:28:30 +01:00
mattandClaude Sonnet 5.5 f80494241b Add Listen screen with microphone permission flow
CI / test (push) Successful in 2m41s
Tap to listen (permission prompt on first use), progress while recording,
then an editable confirmation with Scrobble / Set as now playing / Listen
again. Shares the artist/track/album form with the Add screen and bundles
screen dependencies into AppServices. Recognition currently uses
FakeRecognizer until ACRCloud keys are available.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 12:16:34 +01:00
mattandClaude Sonnet 5.5 2ec12ced67 Add ListenViewModel: record, identify, confirm and submit
Records ~10s, hands the clip to the Recognizer and lands on an editable
confirmation. Scrobble uses the time listening started; "Set as now
playing" announces instead. Editing artist/track drops the recognised
MBID and duration. Cancel stops the microphone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 12:11:37 +01:00
mattandClaude Sonnet 5.5 e0d96c2ad9 Add recognition interfaces, mic recorder, fake recognizer and now-playing
AudioRecorder records 8 kHz mono PCM via AudioRecord; Recognizer is the
seam for a real service (ACRCloud) and FakeRecognizer stands in until
keys exist. ScrobbleRepository gains setNowPlaying (not queued, since it
is only meaningful briefly).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 12:10:58 +01:00
mattandClaude Sonnet 5.5 2ba604ffc7 Show queued scrobbles on Home and friendlier offline errors
CI / test (push) Successful in 2m37s
Home shows "N scrobbles waiting to send" from the live queue count.
Network failures reading history now say "Can't reach the server"
instead of surfacing raw exception text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:56:22 +01:00
mattandClaude Sonnet 5.5 fa4eab47b3 Queue scrobbles offline and flush with WorkManager
When a submit fails for a transient reason (no connection, bad gateway,
server error, rate limit) the scrobble is saved to a Room table and a
network-constrained WorkManager job sends it later, in batches of 50,
oldest first. Plays too old for the server are dropped, and a rejected
session or unexpected error leaves the queue untouched. Safe to retry as
the server dedupes on (user, played_at, artist, track).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:53:24 +01:00
mattandClaude Sonnet 5.5 ee34963799 Add MusicBrainz search tab to the Add screen
CI / test (push) Successful in 2m21s
Search results pre-fill the manual form (artist, track, album, MBID and
duration) so they can be corrected before scrobbling. Editing the artist
or track drops the MBID/duration since they describe a specific recording.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:44:12 +01:00
mattandClaude Sonnet 5.5 0d016b8020 Add MusicBrainz recording search
Free-text queries become escaped Lucene (every word must match title,
artist or release), requests are spaced at 1/s with an app-identifying
User-Agent, and results are mapped to artist/track/album/duration/mbid
with same-song duplicates collapsed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:40:59 +01:00
mattandClaude Sonnet 5.5 16f701c855 Add manual scrobble screen
CI / test (push) Successful in 2m23s
Artist/track/album form with a "played" time chip (now to yesterday) that
submits through ScrobbleRepository. On success the form clears but keeps
the time choice, and History reloads when revisited so the new play shows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:33:04 +01:00
mattandClaude Sonnet 5.5 e4c19cc9ac Add TrackDraft and scrobble submission
TrackDraft is the editable track shared by all add paths, validated
against the server's 14-day / 5-minute window. ScrobbleRepository submits
via track.scrobble with the stored session key, treating an "ignored"
result or an invalid session as errors.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:31:19 +01:00
mattandClaude Sonnet 5.5 01b17fd179 Add Home and History screens
CI / test (push) Successful in 2m37s
Home shows a now-playing panel (polled every 15s while visible), summary
stats and the latest scrobbles. History is an infinite-scrolling,
pull-to-refresh list that dedupes rows when pages shift. Adds edge-to-edge
system bars, themed nav bar and a Sign out button.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:22:19 +01:00
mattandClaude Sonnet 5.5 47c2cf5701 Add history data layer: now playing, recent scrobbles, summary
ScrobblerApi gains /me/now-playing, /me/recent and /me/summary with
null-safe parsing; HistoryRepository reads with the stored bearer token
and maps a 401 to SessionExpiredException.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:19:02 +01:00
mattandClaude Sonnet 5.5 36399be147 Add connect flow: login, API app provisioning and secure storage
CI / test (push) Successful in 2m17s
DefaultAuthRepository logs in for a bearer token, finds or creates the
"Scrobbled Android" API app (reused on reconnect), then obtains a Last.fm
session key via auth.getMobileSession. Credentials are encrypted with an
Android Keystore AES-GCM key. Adds ScrobblerApi (/api/v1), a Connect
screen + ViewModel, and gates the main shell on stored credentials.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:10:32 +01:00
mattandClaude Sonnet 5.5 5200ebdb2d Add Last.fm API request signer and /2.0/ client
CI / test (push) Successful in 2m11s
Signer matches the server's md5 scheme (verified against vectors generated
by its Python implementation, including unicode). LastFmClient supports
auth.getMobileSession, track.scrobble (batched, indexed fields) and
track.updateNowPlaying, mapping server errors to LastFmException.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:05:18 +01:00
mattandClaude Sonnet 5.5 4716396f64 Set up Compose app shell, theme and Gitea CI
CI / test (push) Failing after 9s
Kotlin + Compose via AGP built-in Kotlin, Material 3 theme mirroring the
web UI palette, bottom-nav shell with placeholder screens, cleartext
network config for self-hosted servers, and a CI workflow running unit
tests, lint and a debug build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 10:59:08 +01:00