sync the rest of the source models

refactor music download/storage to avoid re-download during reset
add palylist to test server setup
This commit is contained in:
austinried
2025-11-07 15:20:38 +09:00
parent 0e6acbed0f
commit 0c80dbdba5
13 changed files with 451 additions and 149 deletions

View File

@@ -3,9 +3,6 @@ import * as path from "jsr:@std/path@1.1.2";
import { MUSIC_DIR } from "./util/env.ts";
import { SubsonicClient } from "./util/subsonic.ts";
await new Deno.Command("rm", { args: ["-rf", path.join(MUSIC_DIR, "*")] })
.output();
const client = new SubsonicClient(
"http://demo.subsonic.org",
"guest1",
@@ -13,7 +10,7 @@ const client = new SubsonicClient(
);
for (const id of ["197", "199", "321"]) {
const { res } = await client.get("download", { id });
const { res } = await client.get("download", [["id", id]]);
let filename = res.headers.get("Content-Disposition")
?.split(";")[1];