Fix LastFM API scrobble parsing when song is currently playing

This commit is contained in:
mitteneer 2025-05-31 14:31:15 -04:00
parent c57bf18627
commit a314fd447d

View file

@ -103,7 +103,8 @@ pub fn post(request: *jetzig.Request) !jetzig.View {
}
},
.LastFMWeb => |scrobbles| {
for (scrobbles) |scrobble| {
appends: for (scrobbles) |scrobble| {
if (scrobble.date == null) continue :appends;
const filtered_scrobble = Data.Scrobble{
.album = if (scrobble.album) |album| album.@"#text" else "Not Provided",
.artists_album = &[_][]const u8{scrobble.artist.@"#text"},