mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-10-18 11:25: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,
|
||||
});
|
||||
|
||||
if (!data.Items || data.Items.length !== 1) {
|
||||
if (!data.Items || data.Items.length === 0) {
|
||||
this.logger.warn(`Failed to retrieve item via id '${ids}'`);
|
||||
return [];
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ export class JellyfinWebSocketService implements OnModuleDestroy {
|
||||
`Processing ${ids.length} ids received via websocket and adding them to the queue`,
|
||||
);
|
||||
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);
|
||||
break;
|
||||
case SessionMessageType[SessionMessageType.Playstate]:
|
||||
|
Loading…
Reference in New Issue
Block a user