Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

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

library: fix empty artist fields

+11 -3
+11 -3
crates/library/src/audio_scan.rs
··· 57 57 let album_id = cuid::cuid1()?; 58 58 let album_md5 = format!( 59 59 "{:x}", 60 - md5::compute(format!("{}{}", entry.albumartist, entry.album).as_bytes()) 60 + md5::compute( 61 + format!("{}{}{}", entry.albumartist, entry.album, entry.year).as_bytes() 62 + ) 61 63 ); 62 64 63 65 repo::track::save( ··· 98 100 Album { 99 101 id: album_id, 100 102 title: entry.album, 101 - artist: entry.albumartist.clone(), 103 + artist: match entry.albumartist.is_empty() { 104 + true => entry.artist.clone(), 105 + false => entry.albumartist.clone(), 106 + }, 102 107 year: entry.year as u32, 103 108 year_string: entry.year_string, 104 109 album_art, ··· 111 116 pool.clone(), 112 117 Artist { 113 118 id: artist_id, 114 - name: entry.albumartist.clone(), 119 + name: match entry.albumartist.is_empty() { 120 + true => entry.artist.clone(), 121 + false => entry.albumartist.clone(), 122 + }, 115 123 bio: None, 116 124 image: None, 117 125 },