Add #43: Enable playback of artists, albums and tracks on Android TV and Plex players

music
Juraj Nyíri 3 years ago
parent b40769c44a
commit 48a66d9cde

@ -17205,8 +17205,8 @@ const CSS_STYLE = {
}; };
const supported = { const supported = {
kodi: ['movie', 'episode', 'epg'], kodi: ['movie', 'episode', 'epg'],
androidtv: ['movie', 'show', 'season', 'episode', 'clip'], androidtv: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'],
plexPlayer: ['movie', 'show', 'season', 'episode', 'clip'], plexPlayer: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'],
cast: ['movie', 'episode'] cast: ['movie', 'episode']
}; };
@ -19858,13 +19858,27 @@ class PlayController {
const entityVal = value; const entityVal = value;
if (lodash.isArray(entityVal)) { if (lodash.isArray(entityVal)) {
for (const entity of entityVal) { for (const entity of entityVal) {
// eslint-disable-next-line no-await-in-loop if (!lodash.isNil(this.hass.states[entity])) {
this.entityStates[entity] = await getState(this.hass, entity); try {
// eslint-disable-next-line no-await-in-loop
this.entityStates[entity] = await getState(this.hass, entity);
}
catch (err) {
// pass
}
}
} }
} }
else { else {
// eslint-disable-next-line no-await-in-loop try {
this.entityStates[entityVal] = await getState(this.hass, entityVal); if (!lodash.isNil(this.hass.states[entityVal])) {
// eslint-disable-next-line no-await-in-loop
this.entityStates[entityVal] = await getState(this.hass, entityVal);
}
}
catch (err) {
// pass
}
} }
} }
return this.entityStates; return this.entityStates;

@ -10,8 +10,8 @@ const CSS_STYLE: any = {
const supported: any = { const supported: any = {
kodi: ['movie', 'episode', 'epg'], kodi: ['movie', 'episode', 'epg'],
androidtv: ['movie', 'show', 'season', 'episode', 'clip'], androidtv: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'],
plexPlayer: ['movie', 'show', 'season', 'episode', 'clip'], plexPlayer: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'],
cast: ['movie', 'episode'] cast: ['movie', 'episode']
}; };

Loading…
Cancel
Save