···1515 let album_hash = sha256::digest(format!("{} - {}", record.title, record.artist).to_lowercase());
16161717 match conn.execute(
1818- "UPDATE albums SET uri = ? WHERE sha256 = ? AND uri IS NULL;",
1919- params![uri, album_hash],
1818+ "UPDATE albums SET uri = ? WHERE title = ? AND artist = ? AND uri IS NULL;",
1919+ params![uri, record.title, record.artist],
2020 ) {
2121 Ok(x) => {
2222 tracing::info!("Album URI updated successfully: {}", x);
+2-2
crates/feed/src/repo/duckdb/artist.rs
···1515 let artist_hash = sha256::digest(record.name.to_lowercase());
16161717 match conn.execute(
1818- "UPDATE artists SET uri = ?, picture = ? WHERE sha256 = ? AND URI IS NULL;",
1919- params![uri, record.picture_url, artist_hash],
1818+ "UPDATE artists SET uri = ?, picture = ? WHERE name = ? AND uri IS NULL;",
1919+ params![uri, record.picture_url, record.name],
2020 ) {
2121 Ok(x) => {
2222 tracing::info!("Artist URI updated successfully: {}", x);
+2-2
crates/feed/src/repo/duckdb/track.rs
···1616 );
17171818 match conn.execute(
1919- "UPDATE tracks SET uri = ? WHERE sha256 = ? AND uri IS NULL;",
2020- params![uri, track_hash],
1919+ "UPDATE tracks SET uri = ? WHERE title = ? AND artist = ? AND album = ? AND uri IS NULL;",
2020+ params![uri, record.title, record.artist, record.album],
2121 ) {
2222 Ok(x) => {
2323 tracing::info!("Track URI updated successfully: {}", x);