A decentralized music tracking and discovery platform built on AT Protocol 🎵
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: update track URIs for albums and artists when saving to the database

+16
+8
crates/feed/src/repo/duckdb/album.rs
··· 26 26 } 27 27 28 28 match conn.execute( 29 + "UPDATE tracks SET album_uri = ? WHERE album = ? AND album_artist = ? AND album_uri IS NULL;", 30 + params![uri, record.title, record.artist], 31 + ) { 32 + Ok(x) => tracing::info!("Track album_uri updated successfully: {}", x), 33 + Err(e) => tracing::error!(error = %e, "Error updating track album_uri"), 34 + } 35 + 36 + match conn.execute( 29 37 "INSERT OR IGNORE INTO albums ( 30 38 id, 31 39 title,
+8
crates/feed/src/repo/duckdb/artist.rs
··· 26 26 } 27 27 28 28 match conn.execute( 29 + "UPDATE tracks SET artist_uri = ? WHERE album_artist = ? AND artist_uri IS NULL;", 30 + params![uri, record.name], 31 + ) { 32 + Ok(x) => tracing::info!("Track artist_uri updated successfully: {}", x), 33 + Err(e) => tracing::error!(error = %e, "Error updating track artist_uri"), 34 + } 35 + 36 + match conn.execute( 29 37 &format!( 30 38 "INSERT OR IGNORE INTO artists ( 31 39 id,