From a314fd447d4b7e21df030e57c349eb7bfdf0ca2d Mon Sep 17 00:00:00 2001 From: mitteneer Date: Sat, 31 May 2025 14:31:15 -0400 Subject: [PATCH] Fix LastFM API scrobble parsing when song is currently playing --- src/app/views/upload.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/views/upload.zig b/src/app/views/upload.zig index bdb5cef..ebe9395 100644 --- a/src/app/views/upload.zig +++ b/src/app/views/upload.zig @@ -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"},