Skip to content

Commit

Permalink
Merge pull request #995 from rern/UPDATE
Browse files Browse the repository at this point in the history
u
  • Loading branch information
rern authored Aug 28, 2022
2 parents c0284b8 + b251388 commit 9c1e308
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion srv/http/assets/css/desktop.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
background-color: var( --cml ) !important;
}
.licover.active:hover {
background: linear-gradient( #000000 192px, var( --cml ) 0 ) !important;
background: linear-gradient( #000000 195px, var( --cml ) 0 ) !important;
}
.mode:hover {
background: var( --cga );
Expand Down
10 changes: 5 additions & 5 deletions srv/http/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ i.map.disabled, .map.disabled i {
margin-top: 230px;
}
.licover.active {
background: linear-gradient( #000000 192px, var( --cm ) 0 ) !important;
background: linear-gradient( #000000 195px, var( --cm ) 0 ) !important;
}
.licoverimg {
position: relative;
Expand All @@ -1608,7 +1608,7 @@ i.map.disabled, .map.disabled i {
display: inline-block;
margin: auto 0 0 0;
padding: 0 5px 0 10px;
line-height: 34px;
line-height: 30px;
color: var( --cw );
overflow: hidden;
}
Expand All @@ -1620,8 +1620,8 @@ i.map.disabled, .map.disabled i {
.liinfo i {
margin: 0 10px 0 0 !important;
width: 28px !important;
line-height: 33px !important;
vertical-align: middle;
font-size: 22px !important;
line-height: 25px !important;
color: var( --cg60 ) !important;
}
#lib-list,
Expand Down Expand Up @@ -1736,7 +1736,7 @@ i.map.disabled, .map.disabled i {
#lib-list i {
width: 40px;
margin-top: 3px;
font-size: 26px;
font-size: 24px;
line-height: 40px;
text-align: center;
color: var( --cg60 );
Expand Down
4 changes: 2 additions & 2 deletions srv/http/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1698,9 +1698,9 @@ $( '#page-library' ).on( 'click', '#lib-list li', function( e ) {
return
}
} else if ( mode !== 'album' ) { // list by mode (non-album)
if ( [ 'genre', 'date' ].includes( G.mode ) ) {
if ( [ 'date', 'genre' ].includes( G.mode ) ) {
var format = [ 'artist', 'album' ];
} else if ( [ 'composer', 'conductor' ].includes( G.mode ) ) {
} else if ( [ 'conductor', 'composer' ].includes( G.mode ) ) {
var format = [ 'album', 'artist' ];
} else {
var format = [ 'album' ];
Expand Down
12 changes: 7 additions & 5 deletions srv/http/mpdlibrary.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,20 +298,22 @@ function htmlFind( $lists, $f ) { // non-file 'find' command
return strnatcasecmp( $a->sort, $b->sort );
} );
foreach( $array as $each ) {
$key0 = $f[ 0 ];
$val0 = $each->$key0;
if ( count( $f ) > 1 ) {
$key1 = $f[ 1 ];
$date_genre = in_array( $gmode, [ 'date', 'genre' ] );
$key0 = $date_genre ? $f[ 1 ] : $f[ 0 ];
$key1 = $date_genre ? $f[ 0 ] : $f[ 1 ];
$val0 = $each->$key0;
$val1 = $each->$key1;
$name = $date_genre ? $val1.'<gr> • </gr>'.$val0 : $val0.'<gr> • </gr>'.$val1;
} else {
$key1 = '';
$val0 = $each->$f[ 0 ];
$val1 = '';
$name = $val0;
}
$index = strtoupper( mb_substr( $each->sort, 0, 1, 'UTF-8' ) );
$indexes[] = $index;
if ( !$val0 && !$val1 ) continue;

$name = $fL > 1 ? $val0.'<gr> • </gr>'.$val1 : $val0;
if ( property_exists( $each, 'path' ) ) { // cue //////////////////////////
$path = $each->path;
$datamode = $mode;
Expand Down

0 comments on commit 9c1e308

Please sign in to comment.