mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-10-18 19:35:04 +02:00
Fix casting to the bot device (#255)
This commit is contained in:
parent
7ea6b30b28
commit
390c6f145f
@ -162,7 +162,7 @@ export class JellyfinSearchService {
|
|||||||
includeItemTypes,
|
includeItemTypes,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!data.Items || data.Items.length !== 1) {
|
if (!data.Items || data.Items.length === 0) {
|
||||||
this.logger.warn(`Failed to retrieve item via id '${ids}'`);
|
this.logger.warn(`Failed to retrieve item via id '${ids}'`);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ export class JellyfinWebSocketService implements OnModuleDestroy {
|
|||||||
`Processing ${ids.length} ids received via websocket and adding them to the queue`,
|
`Processing ${ids.length} ids received via websocket and adding them to the queue`,
|
||||||
);
|
);
|
||||||
const searchHints = await this.jellyfinSearchService.getAllById(ids);
|
const searchHints = await this.jellyfinSearchService.getAllById(ids);
|
||||||
const tracks = flatMapTrackItems(searchHints, this.jellyfinSearchService);
|
const tracks = await flatMapTrackItems(searchHints, this.jellyfinSearchService);
|
||||||
this.playbackService.getPlaylistOrDefault().enqueueTracks(tracks);
|
this.playbackService.getPlaylistOrDefault().enqueueTracks(tracks);
|
||||||
break;
|
break;
|
||||||
case SessionMessageType[SessionMessageType.Playstate]:
|
case SessionMessageType[SessionMessageType.Playstate]:
|
||||||
|
Loading…
Reference in New Issue
Block a user