This commit is contained in:
Medvidek77 2025-04-02 22:37:28 +02:00
parent e45599e9ec
commit d32c6cc594
3 changed files with 14 additions and 2 deletions

View file

@ -3,7 +3,7 @@ const std = @import("std");
const dbg_print = std.debug.print;
pub fn extract(allocator: std.mem.Allocator, json_string: []const u8) !void {
pub fn decode_song_data(allocator: std.mem.Allocator, json_string: []const u8) !void {
const parsed = try std.json.parseFromSlice(
std.json.Value,
allocator,
@ -32,3 +32,14 @@ pub fn extract(allocator: std.mem.Allocator, json_string: []const u8) !void {
}
}
pub fn decode_album_data() void {
unreachable;
}
pub fn decode_track_results() void {
unreachable;
}
pub fn decode_album_results() void {
unreachable;
}

View file

@ -24,6 +24,6 @@ pub fn main() !void {
const data = try url.fetch(allocator, "https://tidal.401658.xyz/track/?id=286266927&quality=LOSSLESS");
defer allocator.free(data);
try json.extract(allocator, data);
try json.decode_song_data(allocator, data);
}

View file

@ -32,3 +32,4 @@ pub fn fetch(allocator: std.mem.Allocator, url: []const u8) ![]u8 {
}
}