diff --git a/install.sh b/install.sh
index 532c4de76..7dcfa306b 100644
--- a/install.sh
+++ b/install.sh
@@ -4,12 +4,13 @@ alias=r1
. /srv/http/bash/settings/addons.sh
-# 20240107
+# 20240108
if [[ -e /usr/bin/camilladsp ]]; then
rm -f $dirsystem/camilla.conf
mkdir -p $dircamilladsp/raw
if [[ $( camilladsp -V ) != 'CamillaDSP 2.0.0' ]]; then
systemctl stop camilladsp
+ rm -f /etc/default/camilladsp /usr/lib/systemd/system/camilladsp.service
pacman -Sy --needed --noconfirm camilladsp
readarray -t files <<< $( grep -rl enable_resampling $dircamilladsp )
for f in "${files[@]}"; do
diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css
index 024d52597..b73059b58 100644
--- a/srv/http/assets/css/main.css
+++ b/srv/http/assets/css/main.css
@@ -69,7 +69,8 @@ a {
min-width: 100px;
height: 100px;
}
-.infobookmark .i-bookmark {
+.infobookmark .i-bookmark,
+#infoList .i-bookmark {
width: 100px !important;
font-size: 48px !important;
line-height: 72px;
diff --git a/srv/http/assets/js/common.js b/srv/http/assets/js/common.js
index f77988353..d76e7d579 100644
--- a/srv/http/assets/js/common.js
+++ b/srv/http/assets/js/common.js
@@ -450,7 +450,7 @@ function info( json ) {
htmls.list += htmls.list.slice( -3 ) === 'tr>' ? td0 : '
';
break;
case 'hidden':
- htmls.list += ' | '+ label +' | ';
+ htmls.list += ' |
| ';
break;
case 'radio':
htmls.list += ' |
'+ label +' | ';
@@ -459,7 +459,8 @@ function info( json ) {
htmls.list += ' |
';
break;
default:
- htmls.list += ' |
'+ label +' | ';
+ htmls.list += htmls.list.slice( -3 ) === 'td>' ? '' : ' |
'+ label +' | ';
+ htmls.list += l[ 4 ] ? '' : ' | ';
}
switch ( type ) {
case 'checkbox':
@@ -471,33 +472,33 @@ function info( json ) {
case 'text':
var unit = typeof l[ 2 ] === 'object' ? false : l[ 2 ];
var updn = unit ? false : l[ 2 ];
- htmls.list += ' | ';
+ htmls.list += '';
if ( unit ) {
- htmls.list += ' '+ unit +' | ';
+ htmls.list += l[ 3 ] === 'td' ? '' : ' '+ unit +'';
} else if ( updn ) {
I.updn.push( updn );
- htmls.list += ' | '+ ico( 'remove updn dn' ) + ico( 'plus-circle updn up' ) +' | ';
+ htmls.list += ''+ ico( 'remove updn dn' ) + ico( 'plus-circle updn up' );
}
- htmls.list += ' |
';
+ htmls.list += l[ 3 ] === 'td' ? '' : '';
break;
case 'password':
htmls.list += ''+ ico( 'eye' ) +' | ';
break;
case 'radio':
var isarray = $.isArray( l[ 2 ] );
- var br = false;
+ var tr = false;
$.each( l[ 2 ], ( k, v ) => {
var k = isarray ? v : k;
- if ( br ) htmls.list += ' | ';
+ if ( tr ) htmls.list += ' |
| ';
htmls.list += '';
- if ( l[ 3 ] === 'br' ) {
- br = true;
+ if ( l[ 3 ] === 'tr' ) {
+ tr = true;
htmls.list += ' |
'; // 1:1 line
} else {
htmls.list += ' '; // same line
}
} );
- htmls.list += br ? '' : '';
+ htmls.list += tr ? '' : '';
i++;
break;
case 'range':
@@ -509,14 +510,19 @@ function info( json ) {
+'';
break
case 'select':
- htmls.list += '';
- htmls.list += l[ 3 ] ? ' '+ l[ 3 ] +' | ' : ''; // unit
+ htmls.list += '';
+ if ( l[ 3 ] ) {
+ htmls.list += l[ 3 ] === 'td' ? '' : ' '+ l[ 3 ] +' | '; // unit
+ } else {
+ htmls.list += '';
+ }
break;
case 'textarea':
htmls.list += '';
break;
default: // generic string
- htmls.list += l[ 2 ] +''
+ htmls.list += l[ 2 ];
+ htmls.list += l[ 3 ] === 'td' ? '' : '';
}
} );
if ( type !== 'range' ) htmls.list = '';
@@ -602,9 +608,9 @@ function info( json ) {
}
if ( I.updn.length ) {
I.updn.forEach( ( el, i ) => {
- var $tr = $( '#infoList .updn' ).parent().eq( i ).parent()
- var $updn = $tr.find( '.updn' );
- var $num = $updn.parent().prev().find( 'input' );
+ var $td = $( '#infoList .updn' ).parent().eq( i );
+ var $updn = $td.find( '.updn' );
+ var $num = $td.prev().find( 'input' );
var step = el.step;
var v = 0;
var interval, timeout;
@@ -623,7 +629,7 @@ function info( json ) {
$updn.eq( 0 ).toggleClass( 'disabled', v === el.min );
$updn.eq( 1 ).toggleClass( 'disabled', v === el.max );
}
- updnToggle( I.values[ $tr.index() ] );
+ updnToggle( +$num.val() );
$updn.on( 'click', function() {
if ( ! V.press ) numberset( $( this ).hasClass( 'up' ) );
} ).press( function( e ) {
diff --git a/srv/http/assets/js/context.js b/srv/http/assets/js/context.js
index 08104e41c..5eb82bb1f 100644
--- a/srv/http/assets/js/context.js
+++ b/srv/http/assets/js/context.js
@@ -287,9 +287,9 @@ function tagEditor() {
}
list( query, function( values ) {
name[ 1 ] = 'Album Artist';
- var label = [];
+ var list = [];
format.forEach( ( el, i ) => {
- label.push( [ ''+ name[ i ] +' ', 'text' ] );
+ list.push( [ ''+ name[ i ] +' ', 'text' ] );
} );
if ( V.library ) {
var $img = V.librarytrack ? $( '.licoverimg img' ) : V.list.li.find( 'img' );
@@ -308,10 +308,9 @@ function tagEditor() {
info( {
icon : V.playlist ? 'info' : 'tag'
, title : V.playlist ? 'Track Info' : 'Tag Editor'
- , width : 500
, message : message
, messagealign : 'left'
- , list : label
+ , list : list
, footer : footer
, footeralign : 'left'
, boxwidth : 'max'
diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js
index 108353f92..ee7aaa793 100644
--- a/srv/http/assets/js/function.js
+++ b/srv/http/assets/js/function.js
@@ -786,7 +786,7 @@ function infoUpdate( path ) {
icon : 'refresh-library'
, title : 'Library Database'
, message : path ? ico( 'folder' ) +' '+ path +'' : ''
- , list : path ? '' : [ '', 'radio', { 'Only changed files' : '', 'Rebuild entire database': 'rescan' }, 'br' ]
+ , list : path ? '' : [ '', 'radio', { 'Only changed files' : '', 'Rebuild entire database': 'rescan' }, 'tr' ]
, beforeshow : () => {
if ( ! C ) {
$( '#infoList input' ).eq( 0 ).prop( 'disabled', true );
@@ -1017,7 +1017,7 @@ function playlistInsertTarget() {
+'
'+ V.pladd.album
+'
'
+'Select where to add:'
- , list : [ '', 'radio', { First : 1, Select: 'select', Last: 'last' }, 'br' ]
+ , list : [ '', 'radio', { First : 1, Select: 'select', Last: 'last' }, 'tr' ]
, values : 'last'
, beforeshow : () => {
$( '#infoList input' ).eq( 1 ).on( 'click', function() {
diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js
index fab49adfe..7534327c5 100644
--- a/srv/http/assets/js/main.js
+++ b/srv/http/assets/js/main.js
@@ -260,7 +260,7 @@ $( '#settings' ).on( 'click', '.submenu', function() {
info( {
icon : 'multiraudio'
, title : 'Switch rAudio'
- , list : [ '', 'radio', data.list, 'br' ]
+ , list : [ '', 'radio', data.list, 'tr' ]
, values : currentip
, beforeshow : () => {
$( '#infoList input' ).each( ( i, el ) => {
@@ -1314,7 +1314,7 @@ $( '#lib-mode-list' ).on( 'click', function( e ) {
if ( $img.length ) {
var icon = ''
} else {
- var icon = ico( 'bookmark bookmark bl' )
+ var icon = ico( 'bookmark bl' )
+'
'+ name +''
}
info( {
diff --git a/srv/http/assets/js/player.js b/srv/http/assets/js/player.js
index 6e316bfd0..51d50dab6 100644
--- a/srv/http/assets/js/player.js
+++ b/srv/http/assets/js/player.js
@@ -155,7 +155,7 @@ $( '#setting-replaygain' ).on( 'click', function() {
info( {
icon : SW.icon
, title : SW.title
- , list : [ '', 'radio', { Auto: 'auto', Album: 'album', Track: 'track' }, 'br' ]
+ , list : [ '', 'radio', { Auto: 'auto', Album: 'album', Track: 'track' }, 'tr' ]
, footer : hardware ? '' : ''
, values : S.replaygainconf
, checkchanged : S.replaygain
diff --git a/srv/http/assets/js/system.js b/srv/http/assets/js/system.js
index 4a5a1bc42..8b7f1cdca 100644
--- a/srv/http/assets/js/system.js
+++ b/srv/http/assets/js/system.js
@@ -284,7 +284,7 @@ $( '#setting-hddsleep' ).on( 'click', function() {
icon : SW.icon
, title : SW.title
, message : 'Timer:'
- , list : [ '', 'radio', { '2 minutes': 24, '5 minutes': 60, '10 minutes': 120 }, 'br' ]
+ , list : [ '', 'radio', { '2 minutes': 24, '5 minutes': 60, '10 minutes': 120 }, 'tr' ]
, values : { APM: S.hddsleep } || default_v.hddsleep
, checkchanged : S.hddsleep
, cancel : switchCancel
@@ -952,55 +952,36 @@ function infoPowerbuttonAudiophonics() {
} );
}
function infoRelays() {
- var values = S.relaysconf || default_v.relays;
- var name = S.relaysnameconf || default_v.relaysname;
- var pL = 0;
- var option_name = '';
- $.each( name, ( k, v ) => {
- if ( v ) {
- option_name += '';
- pL++;
- }
- } );
- var option_delay = htmlOption( [ ...Array(10).keys() ] );
- var updn = ico( 'remove updn dn' ) + ico( 'plus-circle updn up' );
- var td_name = ' | ';
- var tr_name = ''+ td_name + td_name +'
';
- var td_delay = ''+ updn +' | ';
- var tr_delay = ''+ td_delay + td_delay +'
';
- var list = ''+ ico( 'power grn' ) +' On (s) | '+ ico( 'power red' ) +' Off (s) |
';
- for ( i = 0; i < pL; i++ ) {
- list += tr_name;
- if ( i < ( pL -1 ) ) list += tr_delay;
- }
- list += ''+ ico( 'stoptimer yl' ) +' Idle to Off (m) | '+ updn +' |
';
+ var values = S.relaysconf || default_v.relays;
+ var name = S.relaysnameconf || default_v.relaysname;
+ var names = {};
+ $.each( name, ( k, v ) => names[ v ] = k );
+ var step = { step: 1, min: 0, max: 10 }
+ var list = [
+ [ '', '', ico( 'power grn' ) +' On (s)', 'td', 2 ]
+ , [ '', '', ico( 'power red' ) +' Off (s)', '', 2 ]
+ ];
+ for ( i = 0; i < 4; i++ ) list.push(
+ [ '', 'select', names, 'td', 2 ]
+ , [ '', 'select', names, '', 2 ]
+ , [ '', 'number', step, 'td' ]
+ , [ '', 'number', step ]
+ );
+ list[ 16 ] = [ '', '', ico( 'stoptimer yl' ) +' Idle to Off (m)', 'td', 2 ];
info( {
icon : SW.icon
, title : SW.title
, tablabel : [ 'Sequence', 'Name' ]
, tab : [ '', infoRelaysName ]
- , list : ''
+ , list : list
+ , lableno : true
, values : values
, checkchanged : S.relays
, beforeshow : () => {
$( '#infoList td' ).css( 'text-align', 'left' );
+ $( '#infoList tr:last-child td:nth-child( 2 )' ).css( 'text-align', 'right' );
$( '#infoList .select2-container' ).attr( 'style', 'width: 180px !important' );
- $( '#infoList input' ).css( 'width', '70px' );
- $( '#infoList .idle' ).css( 'text-align', 'right' );
- var min = 0;
- var max = 10;
- $( '#infoList .updn' ).on( 'touchend mouseup keyup', function() {
- var $this = $( this );
- var up = $this.hasClass( 'up' );
- var $up = up ? $this : $this.next();
- var $dn = up ? $this.prev() : $this;
- var $num = $this.parent().prev().find( 'input' );
- var val = +$num.val();
- up ? val++ : val--;
- $num.val( val );
- $up.toggleClass( 'disabled', val === max );
- $dn.toggleClass( 'disabled', val === min );
- } );
+ $( '#infoList input' ).parent().css( 'width', '70px' );
}
, cancel : switchCancel
, ok : infoRelaysCmd
@@ -1044,15 +1025,19 @@ function infoRelaysName() {
var name = S.relaysnameconf || default_v.relaysname;
var values = [];
$.each( name, ( k, v ) => values.push( k, v ) );
- var pin_name = ' | |
';
- var list = ''+ ico( 'gpiopins bl' ) +' Pin | '+ ico( 'tag bl' ) +' Name |
';
- for( i = 0; i < 4; i++ ) list += pin_name;
+ var list = [
+ [ '', '', ico( 'gpiopins bl' ) +' Pin', 'td' ]
+ , [ '', '', ico( 'tag bl' ) +' Name' ]
+ ]
+ var pins = Object.keys( board2bcm )
+ for ( i = 0; i < 4; i++ ) list.push( [ '', 'select', pins, 'td' ], [ '', 'text', '' ] );
info( {
icon : SW.icon
, title : SW.title
, tablabel : [ 'Sequence', 'Name' ]
, tab : [ infoRelays, '' ]
- , list : gpiosvg + '
'
+ , message : gpiosvg
+ , list : list
, values : values
, checkchanged : S.relays
, beforeshow : () => {
diff --git a/srv/http/bash/cmd.sh b/srv/http/bash/cmd.sh
index aa1e59a20..5463e545d 100644
--- a/srv/http/bash/cmd.sh
+++ b/srv/http/bash/cmd.sh
@@ -228,7 +228,7 @@ bookmarkadd )
bkfile="$dirbookmarks/${NAME//\//|}"
[[ -e $bkfile ]] && echo -1 && exit
- echo $DIR > "$bkfile"
+ echo "$DIR" > "$bkfile"
if [[ -e $dirsystem/order.json ]]; then
order=$( jq '. + ["'$DIR'"]' $dirsystem/order.json )
echo "$order" > $dirsystem/order.json