refactor: lazy URL resolution — store only metadata, fetch URL at play time

Follows TS3AudioBot-NetEaseCloudmusic-plugin pattern:
- QueuedSong.url is now optional (metadata-only queue entries)
- resolveAndPlay() fetches URL on-demand right before playback
- Playlist/album/FM load instantly (only metadata stored)
- playNext() resolves URL lazily, skips up to 3 songs on failure
- Avoids expired URLs for songs deep in the queue

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
saopig1andClaude Opus 4.6 committed 2026-03-30 03:05:40 +08:00
1 parent 2e4d6d8d40
commit 080c2836c9
3 files changed
+90 -106

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ export interface QueuedSong {
artist: string;
album: string;
platform: "netease" | "qq";
url: string;
url?: string; // resolved lazily at play time
coverUrl: string;
duration: number; // seconds
}