diff --git a/src/const.ts b/src/const.ts index 01fb578..388af5b 100755 --- a/src/const.ts +++ b/src/const.ts @@ -1 +1 @@ -export const CARD_VERSION = '2.0.2'; +export const CARD_VERSION = '2.0.3'; diff --git a/src/localize/languages/en.json b/src/localize/languages/en.json index 07e73d6..33288c4 100755 --- a/src/localize/languages/en.json +++ b/src/localize/languages/en.json @@ -29,6 +29,6 @@ "filter_out_cast_devices": "Filter out chromecast devices", "spotify_entity": "Spotify media player entity", "default_device": "Default device name", - "filter_devices": "Hide devices (see documentation under 'Advanced usage' for details)" + "filter_devices": "Hide devices (see documentation under 'Advanced usage')" } } diff --git a/src/spotify-card.ts b/src/spotify-card.ts index 9ae0fc7..8900308 100755 --- a/src/spotify-card.ts +++ b/src/spotify-card.ts @@ -323,18 +323,20 @@ export class SpotifyCard extends LitElement { // Generate device list private generateDeviceList(): TemplateResult { - const spotify_connect_devices= this.spotcast_connector.devices.filter(this.checkIfAllowedToShow, this); + const spotify_connect_devices = this.spotcast_connector.devices.filter(this.checkIfAllowedToShow, this); const chromecast_devices = this.spotcast_connector.chromecast_devices.filter(this.checkIfAllowedToShow, this); if (spotify_connect_devices.length == 0 && chromecast_devices.length == 0) { return html`
No devices found
`; } return html` - ${spotify_connect_devices.length > 0 ? html`Spotify Connect devices
` : null} - ${spotify_connect_devices.map((device) => html` this.spotifyDeviceSelected(device)}>${device.name} `)} - ${chromecast_devices.length > 0 ? html`Chromecast devices
` : null} - ${chromecast_devices.map((device) => { - html` this.chromecastDeviceSelected(device)}>${device.friendly_name}`; - })} + ${spotify_connect_devices.length > 0 ? html`Spotify Connect devices
` : null} + ${spotify_connect_devices.map((device) => { + return html` this.spotifyDeviceSelected(device)}>${device.name}`; + })} + ${chromecast_devices.length > 0 ? html`Chromecast devices
` : null} + ${chromecast_devices.map((device) => { + return html` this.chromecastDeviceSelected(device)}>${device.friendly_name}`; + })} `; } @@ -411,13 +413,18 @@ export class SpotifyCard extends LitElement { const playing = this.spotify_state?.attributes.media_playlist === item.name; this.spotify_state?.attributes.media_playlist === item.name; result.push(html`