A music player that connects to your cloud/distributed storage. diffuse.sh
Something went wrong. Try again.
550 B · 20 lines
JavaScript
at main
123456789101112131415161718192021import { SubsonicAPI } from "subsonic-api";
export class SubsonicAPIWithoutFetch extends SubsonicAPI { /** * @param {import("@specs/components/input/opensubsonic/types.d.ts").SubsonicConfig} config */ constructor(config) { super({ ...config, fetch: async (path, params) => { if (path.toString().includes("/rest/stream.view")) { return await fetch(path, { ...params, method: "HEAD" }); } else { return await fetch(path, params); } }, }); this.config = config; }}