Hitlisten: Track Top-40 (since 2007) and Album Top-40 (since 2001) beside the Airplay Top-20, with weeks at #1 and Spotify ids; one hitlisten_charts table (hitlisten_airplay stays as a view)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 01:40:38 +00:00
co-authored by Claude Opus 5.5
parent 347df0d82d
commit 6272fbd75d
4 changed files with 110 additions and 66 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ pub fn collect(db: &Db, http: &Http, limit: usize, log: &mut Vec<String>) -> Res
create_tables(db)?;
crate::hitlisten::create_tables(db)?;
let todo: Vec<(String, String)> = db.conn.prepare(
"SELECT artist, title FROM (SELECT artist, title FROM plays UNION SELECT artist, title FROM hitlisten_airplay) s
"SELECT artist, title FROM (SELECT artist, title FROM plays UNION SELECT artist, title FROM hitlisten_charts WHERE chart != 'a40') s
WHERE NOT EXISTS (SELECT 1 FROM deezer_searches d WHERE d.artist = s.artist AND d.title = s.title)
AND artist != '' AND title != ''")?
.query_map([], |r| Ok((r.get(0)?, r.get(1)?)))?.collect::<Result<_, _>>()?;