|
|
@ -69,13 +69,13 @@ class PlayController {
|
|
|
|
|
|
|
|
|
|
|
|
private playViaKodi = async (title: string, type: string): Promise<void> => {
|
|
|
|
private playViaKodi = async (title: string, type: string): Promise<void> => {
|
|
|
|
const kodiData = await this.getKodiSearch(title);
|
|
|
|
const kodiData = await this.getKodiSearch(title);
|
|
|
|
|
|
|
|
// todo: check if kodiData is not empty!
|
|
|
|
if (type === 'movie') {
|
|
|
|
if (type === 'movie') {
|
|
|
|
await this.hass.callService('kodi', 'call_method', {
|
|
|
|
await this.hass.callService('kodi', 'call_method', {
|
|
|
|
// eslint-disable-next-line @typescript-eslint/camelcase
|
|
|
|
// eslint-disable-next-line @typescript-eslint/camelcase
|
|
|
|
entity_id: this.entity.kodi,
|
|
|
|
entity_id: this.entity.kodi,
|
|
|
|
method: 'Player.Open',
|
|
|
|
method: 'Player.Open',
|
|
|
|
item: {
|
|
|
|
item: {
|
|
|
|
// eslint-disable-next-line @typescript-eslint/camelcase
|
|
|
|
|
|
|
|
movieid: kodiData.movieid
|
|
|
|
movieid: kodiData.movieid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|