Add: Alert if movie/tvshow is not found in kodi

pull/16/head
Juraj Nyíri 4 years ago
parent 74fe0bae96
commit e0fb641224

@ -18775,6 +18775,8 @@ class PlayController {
}
});
if (lodash.isEmpty(foundResult)) {
// eslint-disable-next-line no-alert
alert(`Title ${search} not found in Kodi.`);
throw Error(`Title ${search} not found in Kodi.`);
}
return foundResult;

@ -1,5 +1,6 @@
/* eslint-disable consistent-return */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-env browser */
import { HomeAssistant } from 'custom-card-helpers';
import _ from 'lodash';
import axios from 'axios';
@ -51,6 +52,8 @@ class PlayController {
}
});
if (_.isEmpty(foundResult)) {
// eslint-disable-next-line no-alert
alert(`Title ${search} not found in Kodi.`);
throw Error(`Title ${search} not found in Kodi.`);
}
return foundResult;

Loading…
Cancel
Save