Fix casting to the bot device (#255)

This commit is contained in:
sssionek 2023-11-21 15:10:04 +01:00 committed by GitHub
parent 7ea6b30b28
commit 390c6f145f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 [];
}

View File

@ -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]: