Add LastFM scrobble type
In preparation for importing via LastFM api
This commit is contained in:
parent
c42b8d24dd
commit
4991bac9a4
2 changed files with 33 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ pub fn post(request: *jetzig.Request) !jetzig.View {
|
|||
|
||||
switch (source) {
|
||||
0 => {
|
||||
const content: Data.LastFM = try std.json.parseFromSliceLeaky(Data.LastFM, request.allocator, file.content, .{});
|
||||
const content: Data.LastFMStats = try std.json.parseFromSliceLeaky(Data.LastFMStats, request.allocator, file.content, .{});
|
||||
const before_limiting_date = if (before_limiter and params.get("b") != null) (try zeit.instant(.{ .source = .{ .iso8601 = params.get("b").?.string.value } })).unixTimestamp() * 1000 else 0;
|
||||
const after_limiting_date = if (after_limiter and params.get("a") != null) (try zeit.instant(.{ .source = .{ .iso8601 = params.get("a").?.string.value } })).unixTimestamp() * 1000 else 9_223_372_036_854_775_807;
|
||||
appends: for (content.scrobbles) |scrobble| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue