feat(qq): add radar FM stream

This commit is contained in:
lTinchl committed 2026-06-06 21:09:57 +08:00
1 parent a861b41809
commit e0d17cf404
6 files changed
+217 -84

No files matched your search

+25 -1
View File
@@ -1,7 +1,31 @@
import { describe, it, expect } from "vitest";
import { mapQqAlbums } from "./qq.js";
import { mapQqAlbums, mapQqSongs } from "./qq.js";
describe("QQ adapter", () => {
it("mapQqSongs maps QQMusicApi-style song entries", () => {
const out = mapQqSongs([
{
mid: "001abc",
name: "Radar Song",
singer: [{ name: "Singer A" }, { name: "Singer B" }],
album: { name: "Album A", mid: "alb001" },
interval: 243,
},
]);
expect(out).toEqual([
{
id: "001abc",
name: "Radar Song",
artist: "Singer A / Singer B",
album: "Album A",
duration: 243,
coverUrl: "https://y.gtimg.cn/music/photo_new/T002R300x300M000alb001.jpg",
platform: "qq",
},
]);
});
it("mapQqAlbums maps albumMID-style raw entries", () => {
const raw = [
{