mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-14 17:08:17 +01:00
v4.3.3.42 - DEV Update NSPanelTs.ts
Fix Volumio in cardMedia
This commit is contained in:
@@ -5304,8 +5304,8 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
|||||||
name = 'Spotify-Premium';
|
name = 'Spotify-Premium';
|
||||||
}
|
}
|
||||||
author = getState(id + '.ARTIST').val + ' | ' + getState(id + '.ALBUM').val;
|
author = getState(id + '.ARTIST').val + ' | ' + getState(id + '.ALBUM').val;
|
||||||
if (author.length > 30) {
|
if (author.length > 37) {
|
||||||
author = getState(id + '.ARTIST').val;
|
author = author.slice(0,37) + '...';
|
||||||
}
|
}
|
||||||
if ((getState(id + '.ARTIST').val).length == 0) {
|
if ((getState(id + '.ARTIST').val).length == 0) {
|
||||||
author = findLocale('media','no_music_to_control');
|
author = findLocale('media','no_music_to_control');
|
||||||
@@ -5391,9 +5391,9 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
|||||||
|
|
||||||
//Volumio
|
//Volumio
|
||||||
if (v2Adapter == 'volumio') {
|
if (v2Adapter == 'volumio') {
|
||||||
if (name != undefined) { author = author + " [" + name + "]"; }
|
media_icon = Icons.GetIcon('clock-time-twelve-outline');
|
||||||
name = getState(vInstance + 'info.name').val; /* page.heading;
|
if (name != undefined) { author = author + " | " + name; }
|
||||||
getState(id + '.TRACK').val; */
|
name = page.heading;
|
||||||
}
|
}
|
||||||
|
|
||||||
let volume = getState(id + '.VOLUME').val;
|
let volume = getState(id + '.VOLUME').val;
|
||||||
@@ -5404,7 +5404,7 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
|||||||
if (shuffle == 'off' || shuffle == false || shuffle == 0 || shuffle == 'false') {
|
if (shuffle == 'off' || shuffle == false || shuffle == 0 || shuffle == 'false') {
|
||||||
shuffle_icon = Icons.GetIcon('shuffle-disabled'); //shuffle
|
shuffle_icon = Icons.GetIcon('shuffle-disabled'); //shuffle
|
||||||
}
|
}
|
||||||
if (v2Adapter == 'volumio') { shuffle_icon = Icons.GetIcon('refresh'); } //Volumio: refresh playlist
|
//if (v2Adapter == 'volumio') { shuffle_icon = Icons.GetIcon('shuffle-disabled'); } //Volumio: refresh playlist
|
||||||
|
|
||||||
|
|
||||||
//For all players
|
//For all players
|
||||||
@@ -5447,6 +5447,8 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
|||||||
currentSpeaker = getState(([page.items[0].adapterPlayerInstance, 'Players.', page.items[0].mediaDevice, '.Playername'].join(''))).val;
|
currentSpeaker = getState(([page.items[0].adapterPlayerInstance, 'Players.', page.items[0].mediaDevice, '.Playername'].join(''))).val;
|
||||||
} else if (v2Adapter == 'bosesoundtouch') {
|
} else if (v2Adapter == 'bosesoundtouch') {
|
||||||
currentSpeaker = getState(([page.items[0].adapterPlayerInstance, 'deviceInfo.name'].join(''))).val;
|
currentSpeaker = getState(([page.items[0].adapterPlayerInstance, 'deviceInfo.name'].join(''))).val;
|
||||||
|
} else if (v2Adapter == 'volumio') {
|
||||||
|
currentSpeaker = getState(([page.items[0].adapterPlayerInstance, 'info.name'].join(''))).val;
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------
|
||||||
// All Alexa devices (the online / player and commands directory is available) are listed and linked below
|
// All Alexa devices (the online / player and commands directory is available) are listed and linked below
|
||||||
@@ -5672,7 +5674,7 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
|||||||
} else if (v2Adapter == 'volumio') { /* Volumio: only Repeat true/false with API */
|
} else if (v2Adapter == 'volumio') { /* Volumio: only Repeat true/false with API */
|
||||||
if (getState(id + '.REPEAT').val == true) {
|
if (getState(id + '.REPEAT').val == true) {
|
||||||
repeatIcon = Icons.GetIcon('repeat-variant');
|
repeatIcon = Icons.GetIcon('repeat-variant');
|
||||||
repeatIconCol = rgb_dec565(colMediaIcon);
|
repeatIconCol = rgb_dec565(HMIOn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5758,7 +5760,6 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function createAutoAlarmAlias (id: string, nsPath: string){
|
async function createAutoAlarmAlias (id: string, nsPath: string){
|
||||||
try {
|
try {
|
||||||
if (Debug){
|
if (Debug){
|
||||||
|
|||||||
Reference in New Issue
Block a user