feat: qbz-1 streaming, gapless prefetch, accurate scrobbling, Range-seek

Port proven playback architecture from qbqt fork:
- Bounded VecDeque buffer with condvar backpressure (4MB cap)
- decrypt_and_extract_frames for clean FLAC frame extraction from ISOBMFF
- Cancel+restart seeking with sub-segment sample skipping
- start_prefetch / QueueNext for gapless transitions with pre-started downloads
- track_transitioned signaling for scrobbler during gapless playback
- Range-request HTTP seeking for non-segmented (MP3) tracks
- OnceLock HTTP client singleton with cancel-aware chunked downloads
- Accumulated listening time scrobbling (prevents false scrobbles from seeking)
- Array-format Last.fm scrobble params (artist[0], track[0], etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
joren
2026-03-30 20:12:23 +02:00
parent 6c8d032ce9
commit 70810bd4b1
16 changed files with 1539 additions and 382 deletions

View File

@@ -28,6 +28,15 @@ md5 = "0.7"
dirs = "5"
toml = "0.8"
# Crypto — qbz-1 key derivation + segment decryption
aes = "0.8"
cbc = { version = "0.1", features = ["alloc"] }
ctr = "0.9"
hkdf = "0.12"
sha2 = "0.10"
hex = "0.4"
base64 = "0.22"
[profile.release]
lto = "thin"
opt-level = 3