feat(spotify): wire provider through manager/instance; skip playback sentinel

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
saopig1andClaude Opus 4.8 committed 2026-07-02 00:13:22 +08:00
1 parent 848b3931b8
commit 9a9f68c446
4 files changed
+44 -2

No files matched your search

+7 -1
View File
@@ -76,6 +76,7 @@ export class BotManager extends EventEmitter {
private youtubeProvider: MusicProvider;
private localProvider: MusicProvider;
private kugouProvider: MusicProvider;
private spotifyProvider: MusicProvider;
private database: BotDatabase;
private config: BotConfig;
private logger: Logger;
@@ -94,7 +95,8 @@ export class BotManager extends EventEmitter {
permissions: PermissionStore,
configPath: string,
localProvider?: MusicProvider,
kugouProvider?: MusicProvider
kugouProvider?: MusicProvider,
spotifyProvider?: MusicProvider
) {
super();
this.neteaseProvider = neteaseProvider;
@@ -103,6 +105,7 @@ export class BotManager extends EventEmitter {
this.youtubeProvider = new YouTubeProvider();
this.localProvider = localProvider ?? neteaseProvider;
this.kugouProvider = kugouProvider ?? neteaseProvider;
this.spotifyProvider = spotifyProvider ?? neteaseProvider;
// Let the local provider see which uploads are still referenced by any
// bot's queue, so it never deletes a file another queue/bot still needs.
const referenceable = this.localProvider as Partial<{
@@ -141,6 +144,7 @@ export class BotManager extends EventEmitter {
youtubeProvider: this.youtubeProvider,
localProvider: this.localProvider,
kugouProvider: this.kugouProvider,
spotifyProvider: this.spotifyProvider,
database: this.database,
config: this.config,
logger: this.logger,
@@ -281,6 +285,7 @@ export class BotManager extends EventEmitter {
youtubeProvider: this.youtubeProvider,
localProvider: this.localProvider,
kugouProvider: this.kugouProvider,
spotifyProvider: this.spotifyProvider,
database: this.database,
config: this.config,
logger: this.logger,
@@ -335,6 +340,7 @@ export class BotManager extends EventEmitter {
youtubeProvider: this.youtubeProvider,
localProvider: this.localProvider,
kugouProvider: this.kugouProvider,
spotifyProvider: this.spotifyProvider,
database: this.database,
config: this.config,
logger: this.logger,