feat: prepare media resolver source kinds
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
73901231c3
commit
6aeabc690f
+2
-1
@@ -21,9 +21,9 @@
|
||||
"db:studio": "drizzle-kit studio"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dank074/discord-video-stream": "workspace:*",
|
||||
"@discordjs/opus": "^0.10.0",
|
||||
"@discordjs/voice": "^0.19.1",
|
||||
"@dank074/discord-video-stream": "workspace:*",
|
||||
"@snazzah/davey": "^0.1.10",
|
||||
"@types/pg": "^8.20.0",
|
||||
"@vitejs/plugin-react": "^6.0.2",
|
||||
@@ -38,6 +38,7 @@
|
||||
"pg": "^8.20.0",
|
||||
"pino": "^10.3.1",
|
||||
"pino-http": "^11.0.0",
|
||||
"play-dl": "^1.9.7",
|
||||
"prism-media": "2.0.0-alpha.0",
|
||||
"prom-client": "^15.1.3",
|
||||
"react": "^19.2.6",
|
||||
|
||||
Generated
+16
@@ -59,6 +59,9 @@ importers:
|
||||
pino-http:
|
||||
specifier: ^11.0.0
|
||||
version: 11.0.0
|
||||
play-dl:
|
||||
specifier: ^1.9.7
|
||||
version: 1.9.7
|
||||
prism-media:
|
||||
specifier: 2.0.0-alpha.0
|
||||
version: 2.0.0-alpha.0
|
||||
@@ -3364,6 +3367,13 @@ packages:
|
||||
pkg-types@1.3.1:
|
||||
resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}
|
||||
|
||||
play-audio@0.5.2:
|
||||
resolution: {integrity: sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==}
|
||||
|
||||
play-dl@1.9.7:
|
||||
resolution: {integrity: sha512-KpgerWxUCY4s9Mhze2qdqPhiqd8Ve6HufpH9mBH3FN+vux55qSh6WJKDabfie8IBHN7lnrAlYcT/UdGax58c2A==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
|
||||
plur@4.0.0:
|
||||
resolution: {integrity: sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -7293,6 +7303,12 @@ snapshots:
|
||||
mlly: 1.8.2
|
||||
pathe: 2.0.3
|
||||
|
||||
play-audio@0.5.2: {}
|
||||
|
||||
play-dl@1.9.7:
|
||||
dependencies:
|
||||
play-audio: 0.5.2
|
||||
|
||||
plur@4.0.0:
|
||||
dependencies:
|
||||
irregular-plurals: 3.5.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Readable } from "node:stream";
|
||||
|
||||
export type MediaMode = "music" | "screen";
|
||||
export type MediaSourceKind = "url" | "local";
|
||||
export type MediaSourceKind = "url" | "local" | "youtube" | "spotify" | "search";
|
||||
export type MediaQueueItemStatus = "queued" | "playing" | "failed";
|
||||
|
||||
export interface ResolvedMediaSource {
|
||||
|
||||
@@ -93,7 +93,7 @@ export interface AnalysisResult {
|
||||
}
|
||||
|
||||
export type MediaMode = "music" | "screen";
|
||||
export type MediaSourceKind = "url" | "local";
|
||||
export type MediaSourceKind = "url" | "local" | "youtube" | "spotify" | "search";
|
||||
export type MediaQueueItemStatus = "queued" | "playing" | "failed";
|
||||
|
||||
export interface MediaQueueItem {
|
||||
|
||||
@@ -68,4 +68,13 @@ describe("resolveMediaSource", () => {
|
||||
statusCode: 400,
|
||||
} satisfies Partial<AppError>);
|
||||
});
|
||||
|
||||
it("keeps direct URLs as generic URL sources", async () => {
|
||||
await expect(
|
||||
resolveMediaSource("https://cdn.example.com/song.mp3"),
|
||||
).resolves.toMatchObject({
|
||||
kind: "url",
|
||||
source: "https://cdn.example.com/song.mp3",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user