feat: add recently played and scrobble flow

This commit is contained in:
2026-04-03 02:15:57 +03:00
parent 2bbf52a41b
commit 4d44632fbf
7 changed files with 320 additions and 54 deletions

View File

@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS play_history (
id TEXT PRIMARY KEY,
user_id TEXT NOT NULL,
track_id TEXT NOT NULL,
event_type TEXT NOT NULL,
played_at TEXT NOT NULL,
client_name TEXT,
submission INTEGER NOT NULL DEFAULT 0
);
CREATE INDEX IF NOT EXISTS idx_play_history_user_played_at ON play_history(user_id, played_at DESC);
CREATE INDEX IF NOT EXISTS idx_play_history_track_played_at ON play_history(track_id, played_at DESC);