Skip to content

Commit

Permalink
Merge pull request #1064 from rern/UPDATE
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
rern authored Oct 13, 2022
2 parents 27af137 + 23bb08b commit d3fc7bc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 25 deletions.
20 changes: 8 additions & 12 deletions srv/http/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,13 @@ li.active .li2 bl {
@media (max-width: 340px) { .mode gr { display: none } }
/************************************************************************************/
@media ( orientation: landscape ) {
@media ( max-width: 768px ) { #page-playback { --scale: 0.95 } }
@media ( max-width: 700px ) { #page-playback { --scale: 0.9 } }
@media ( max-width: 670px ) { #page-playback { --scale: 0.85 } }
@media ( max-width: 630px ) { #page-playback { --scale: 0.8 } }
@media ( max-width: 590px ) { #page-playback { --scale: 0.75 } }
@media ( max-width: 550px ) { #page-playback { --scale: 0.7 } }
@media ( max-width: 510px ) { #page-playback { --scale: 0.65 } }
@media ( max-height: 540px ) {
#page-playback { padding: 40px 0 !important; }
#page-playback.barsalways { padding: 60px 0 60px !important }
Expand Down Expand Up @@ -2140,13 +2147,6 @@ li.active .li2 bl {
#bar-bottom,
#page-playback { padding-top: 20px !important }
}
@media ( max-width: 768px ) { #page-playback { --scale: 0.95 } }
@media ( max-width: 700px ) { #page-playback { --scale: 0.9 } }
@media ( max-width: 670px ) { #page-playback { --scale: 0.85 } }
@media ( max-width: 630px ) { #page-playback { --scale: 0.8 } }
@media ( max-width: 590px ) { #page-playback { --scale: 0.75 } }
@media ( max-width: 550px ) { #page-playback { --scale: 0.7 } }
@media ( max-width: 510px ) { #page-playback { --scale: 0.65 } }
/*----------------------------------------------------------------------------------*/
#coverart-block, #divcover { max-width: 50vh }
@media ( max-height: 540px ) {
Expand All @@ -2157,10 +2157,7 @@ li.active .li2 bl {
#playback-row { margin-top: 10px }
#time-knob,
#coverart-block,
#volume-knob {
min-width: 30%;
margin: 0 10px;
}
#volume-knob { min-width: 30% }
#play-group,
#vol-group { display: none }
}
Expand Down Expand Up @@ -2205,7 +2202,6 @@ li.active .li2 bl {
#volume-knob { width: auto }
#coverart-block,
#divcover { max-width: 100vw }
#coverTL { color: var( --cg60 ) }
}
@media ( max-width: 480px ) {
#playback-controls i { margin: 0 5px }
Expand Down
8 changes: 1 addition & 7 deletions srv/http/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ $( '.map' ).click( function( e ) {
$( '#guide-bio, #guide-lyrics' ).toggleClass( 'hide', G.status.stream && G.status.state === 'stop' );
$( '#guide-album' ).toggleClass( 'hide', $( '#album' ).hasClass( 'disabled' ) );
$( '#guide-bio, #guide-lyrics, #guide-album' ).toggleClass( 'hide', !G.status.pllength );
$( '#coverTL, #coverL, #coverM, #coverR, #coverB' ).toggleClass( 'disabled', !G.status.pllength );
$( '#coverL, #coverM, #coverR, #coverB' ).toggleClass( 'disabled', !G.status.pllength );
$( '.timemap' ).toggleClass( 'mapshow', !G.display.cover );
$( '.volmap' ).toggleClass( 'mapshow', volume );
$( '#bar-bottom' ).toggleClass( 'translucent', $( '#bar-top' ).is( ':hidden' ) );
Expand Down Expand Up @@ -945,10 +945,6 @@ $( '.map' ).click( function( e ) {
switch ( cmd ) {
case 'cover':
$( '#bar-bottom' ).removeClass( 'translucent' );
if ( G.status.player === 'mpd' && !G.status.pllength
|| $( '#page-playback' ).css( 'transform' ) !== 'none'
) return

if ( !( 'coverTL' in G )
&& ( G.wH - $( '#coverart' )[ 0 ].getBoundingClientRect().bottom ) < 40
&& !G.display.volumenone
Expand All @@ -963,8 +959,6 @@ $( '.map' ).click( function( e ) {
return
}

if ( G.wW < 545 && G.wW < G.wH ) return

var list = [ 'bars', 'time', 'cover', 'volume', 'buttons' ];
if ( 'coverTL' in G ) {
list.forEach( function( el ) {
Expand Down
2 changes: 1 addition & 1 deletion srv/http/bash/cmd-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ for mode in album albumartist artist composer conductor genre date; do
else
printf -v $mode '%s' $( mpc list $mode | awk NF | awk '{$1=$1};1' | tee $filemode | wc -l )
fi
(( $mode > 0 )) && php cmd-listsort.php $filemode
(( $mode > 0 )) && php /srv/http/bash/cmd-listsort.php $filemode
done

##### latest album #############################################
Expand Down
4 changes: 1 addition & 3 deletions srv/http/cmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
$sudo = '/usr/bin/sudo ';
$sudobin = $sudo.'/usr/bin/';
$dirdata = '/srv/http/data/';
$dirbookmarks = $dirdata.'bookmarks/';
$dirsystem = $dirdata.'system/';

switch( $_POST[ 'cmd' ] ) {

Expand Down Expand Up @@ -61,7 +59,7 @@
shell_exec( $script );
break;
case 'login':
$passwordfile = $dirsystem.'loginset';
$passwordfile = $dirdata.'system/loginset';
if ( file_exists( $passwordfile ) ) {
$hash = file_get_contents( $passwordfile );
if ( !password_verify( $_POST[ 'password' ], $hash ) ) die( -1 );
Expand Down
2 changes: 0 additions & 2 deletions srv/http/mpdplaylist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

$cmd = $_POST[ 'cmd' ] ?? $argv[ 1 ];
$add = $argv[ 2 ] ? true : false;
$dirplaylists = '/srv/http/data/playlists/';
$headers = [ 'http', 'rtmp', 'rtp:', 'rtsp' ];

// current playlist
Expand Down Expand Up @@ -104,7 +103,6 @@ function currentPlaylist() {
}
function htmlSavedPlaylist() {
include '/srv/http/bash/cmd-listsort.php';
global $dirplaylists;
exec( 'mpc lsplaylists'
, $lists );
$count = count( $lists );
Expand Down

0 comments on commit d3fc7bc

Please sign in to comment.