Directly append complete_scrobble in upload.zig
Thanks bob :)
This commit is contained in:
parent
7f3778e82f
commit
aab61631a3
2 changed files with 3 additions and 16 deletions
|
|
@ -138,20 +138,7 @@ pub fn post(request: *jetzig.Request) !jetzig.View {
|
|||
const row = try Utils.scrobbleToRow(request.allocator, complete_scrobble);
|
||||
|
||||
try view_params.append(row);
|
||||
var job_param = try job_params.append(.object);
|
||||
try job_param.put("album", complete_scrobble.album);
|
||||
try job_param.put("track", complete_scrobble.track);
|
||||
try job_param.put("date", complete_scrobble.date);
|
||||
|
||||
var track_artists_array = try job_param.put("artists_track", .array);
|
||||
for (complete_scrobble.artists_track) |a| {
|
||||
try track_artists_array.append(a);
|
||||
}
|
||||
|
||||
var album_artists_array = try job_param.put("artists_album", .array);
|
||||
for (complete_scrobble.artists_album) |a| {
|
||||
try album_artists_array.append(a);
|
||||
}
|
||||
try job_params.append(complete_scrobble);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue