Phase 1+2 of a self-hosted, multi-user listening archive — the basis for day/month/year stats and a yearly "Wrapped". Runs IN ADDITION to the existing Navidrome/Last.fm scrobble; never replaces it. Service (isolated, own container): - scrobble/scrobble-server.js — node:sqlite play-log (own volume), routes POST /scrobble/plays (idempotent by uuid), GET /scrobble/history (archive), DELETE /scrobble/plays?user= (test cleanup), GET /scrobble/health. Multi-user auth via Navidrome ping.view (cached) -> user not spoofable. - docker-compose: novasonic-scrobble service (node:22, port 3710) + volume; backend bumped node:20->22 (EOL); SCROBBLE_URL plumbing (entrypoint, .env.example). Capture (both platforms, offline-safe queue, idempotent batch flush): - Fires at the existing scrobbleMode counted-play moment — consistent with Last.fm, respects the user's setting (no separate 50%/4min rule). - Web: src/player/scrobbleLog.js (localStorage queue) + subsonicAuthParams() in api.js + hooks in player.js + flush init in main.js; S.cfg.scrobbleUrl. - Android: data/PlayLogClient.kt (filesDir queue, reused Ktor client) + repo.logPlay/flushPlayLog + PlayerController hook + NovaSonicApp flush + scrobbleUrl in PrefsStore/SettingsViewModel/SettingsScreen (with test button). Plan + design decisions documented in docs/scrobble-plan.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
709 B
Bash
21 lines
709 B
Bash
# Copy to .env and fill in your values
|
|
|
|
# Pre-fills the URLs on the setup screen
|
|
NAVIDROME_URL=https://music.yourdomain.com
|
|
BACKEND_URL=https://novasonic-api.yourdomain.com
|
|
SCROBBLE_URL=https://novasonic-scrobble.yourdomain.com # play-log / stats service (port 3710)
|
|
|
|
# Absolute path to your Navidrome music library on the host
|
|
MUSIC_PATH=/srv/navidrome/music
|
|
|
|
AUDIO_FMT=mp3 # mp3 | flac | opus | best (used by yt-dlp)
|
|
AUDIO_QUALITY=0 # 0 = best quality (used by yt-dlp)
|
|
MAX_PARALLEL=2
|
|
|
|
DOWNLOAD_BACKEND=ytdlp
|
|
|
|
# Ticketmaster Events (optional — free API key)
|
|
# 1. Sign up at https://developer.ticketmaster.com/
|
|
# 2. Create an app — copy the Consumer Key
|
|
TICKETMASTER_API_KEY=
|