Skip to content

Commit

Permalink
Merge pull request #261 from rern/UPDATE
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
rern authored Mar 25, 2021
2 parents 17dfcb8 + 8ad0449 commit dc56504
Show file tree
Hide file tree
Showing 55 changed files with 494 additions and 2,256 deletions.
3 changes: 3 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ alias=r1

. /srv/http/bash/addons.sh

file=/srv/http/data/system/display
grep -q conductor $file || sed -i '/composer/ a\\t"conductor": true,' $file

[[ -e /usr/lib/systemd/system/spotifyd.service ]] || ln -s /usr/lib/systemd/{user,system}/spotifyd.service

installstart "$1"
Expand Down
1 change: 0 additions & 1 deletion srv/http/assets/css/info.css
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ hr {
#infoFilename {
display: inline-block;
margin-bottom: 10px;
max-width: calc( 100% - 120px );
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
3 changes: 2 additions & 1 deletion srv/http/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
.fa-check:before { content: "\f51B" }
.fa-code:before { content: "\f50C" }
.fa-composer:before { content: "\f558" }
.fa-coverart:before { content: "\f559" }
.fa-conductor:before { content: "\f559" }
.fa-coverart:before { content: "\f60D" }
.fa-coverart-refresh:before { content: "\f53D" }
.fa-crop:before { content: "\f568" }
.fa-date:before { content: "\f54B" }
Expand Down
23 changes: 14 additions & 9 deletions srv/http/assets/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ heading i.fa-question-circle {
}
#bar-bottom div {
display: inline-block;
width: calc( 100% / 5 );
max-width: 132px;
width: calc( 100% / 4 );
max-width: 165px;
height: 40px;
cursor: pointer;
}
Expand Down Expand Up @@ -718,17 +718,11 @@ input:checked + .switchlabel.disabled:after {
}
}
@media ( max-width: 580px ) {
#bar-bottom div {
width: calc( 100% / 5 );
}
#bar-bottom a {
display: none;
}
.wide {
display: none;
}
}
@media (max-width: 512px) {
@media (max-width: 515px) {
.container {
padding: 40px 10px 100px 10px;
}
Expand Down Expand Up @@ -777,6 +771,9 @@ input:checked + .switchlabel.disabled:after {
max-width: 100%;
padding: 40px 5px;
}
#bar-bottom {
padding: 0;
}
}
@media (max-width: 450px) {
.title {
Expand All @@ -792,6 +789,11 @@ input:checked + .switchlabel.disabled:after {
display: none;
}
}
@media (max-width: 419px) {
#bar-bottom a {
display: none;
}
}
@media (max-width: 375px) {
.title {
letter-spacing: 7px;
Expand Down Expand Up @@ -832,4 +834,7 @@ input:checked + .switchlabel.disabled:after {
#pkglist {
cursor: pointer;
}
input:disabled {
cursor: not-allowed;
}
}
Binary file modified srv/http/assets/fonts/enhance.ttf
Binary file not shown.
Binary file modified srv/http/assets/fonts/enhance.woff
Binary file not shown.
Binary file modified srv/http/assets/img/guide/46.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/47.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/48.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/49.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/50.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/51.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/52.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/53.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/54.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/55.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/56.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/57.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/guide/58.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srv/http/assets/img/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 2 additions & 8 deletions srv/http/assets/js/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function playlistRename() {
function tagEditor() {
var file = G.list.path;
var cue = file.slice( -4 ) === '.cue';
var format = [ 'album', 'albumartist', 'artist', 'composer', 'genre', 'date' ];
var format = [ 'album', 'albumartist', 'artist', 'composer', 'conductor', 'genre', 'date' ];
var fL = format.length;
if ( !G.list.licover ) {
if ( !cue ) {
Expand Down Expand Up @@ -294,7 +294,7 @@ function tagEditor() {
query : 'find'
, mode : mode
, string : path
, format : [ 'genre', 'composer', 'date' ].indexOf( mode ) !== -1 ? [ 'album', 'artist' ] : [ 'album' ]
, format : [ 'genre', 'composer', 'conductor', 'date' ].indexOf( mode ) !== -1 ? [ 'album', 'artist' ] : [ 'album' ]
}
} else {
if ( G.library ) {
Expand Down Expand Up @@ -365,11 +365,6 @@ function tagEditor() {
loader( 'hide' );
}, 'json' );
}
function updateThumbnails() {
// enclosed in double quotes entity "
var path = G.list.path.slice( -4 ) !== '.cue' ? G.list.path : G.list.path.substr( 0, G.list.path.lastIndexOf( '/' ) );
infoCoverartScan( path );
}
function webRadioCoverart() {
var path = G.library ? G.list.path : G.status.file;
var radiopath = '/data/webradiosimg/'+ path.replace( /\//g, '|' );
Expand Down Expand Up @@ -619,7 +614,6 @@ $( '.contextmenu a, .contextmenu .submenu' ).click( function() {
bookmark : bookmarkNew
, plrename : playlistRename
, pldelete : playlistDelete
, thumbnail : updateThumbnails
, wrcoverart : webRadioCoverart
, wrdelete : webRadioDelete
, wredit : webRadioEdit
Expand Down
40 changes: 16 additions & 24 deletions srv/http/assets/js/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ function addonsdl( std ) {
location.href = '/settings/addons.php';
}
}
function bookmarkThumbReplace( $this, newimg ) {
var $img = $this.find( 'img' );
if ( $img.length ) {
$img.attr( 'src', newimg );
} else {
$this.find( '.fa-bookmark' ).remove();
$this.find( '.divbklabel' ).remove();
$this.find( '.lipath' ).after( '<img class="bkcoverart" src="'+ newimg +'">' );
$( '.mode-bookmark img' ).css( 'opacity', '' );
}
}
function clearIntervalAll() {
[ G.intElapsed, G.intElapsedPl, G.intKnob, G.intRelaysTimer, G.intVu ].forEach( function( el ) {
clearInterval( el );
Expand Down Expand Up @@ -150,7 +139,7 @@ function coverartChange() {
$( '.imgold' ).attr( 'src', src );
}
, ok : function() {
imageReplace( imagefile, 'coverart' );
imageReplace( imagefile, 'cover' );
}
}
if ( G.playback ) {
Expand Down Expand Up @@ -537,7 +526,7 @@ function HMS2Second( HMS ) {
if ( !hhmmss[ 2 ] ) return +hhmmss[ 0 ] + hhmmss[ 1 ] * 60;
return +hhmmss[ 0 ] + hhmmss[ 1 ] * 60 + hhmmss[ 2 ] * 3600;
}
function imageReplace( imagefile, type, callback ) {
function imageReplace( imagefile, type ) {
var file = $( '#infoFileBox' )[ 0 ].files[ 0 ];
var ext = '.'+ file.name.split( '.' ).pop();
var formData = new FormData();
Expand All @@ -561,7 +550,6 @@ function imageReplace( imagefile, type, callback ) {
, processData : false // no - process the data
, contentType : false // no - contentType
, success : function() {
if ( callback ) callback( ext );
$( '.edit' ).remove();
$( '#coverart, #liimg' ).css( 'opacity', '' );
}
Expand Down Expand Up @@ -673,15 +661,15 @@ function mpcSeekBar( pageX ) {
if ( !G.drag ) mpcSeek( position );
}
function orderLibrary() {
if ( G.display.order ) {
$.each( G.display.order, function( i, name ) {
var $libmode = $( '.lib-mode' ).filter( function() {
return $( this ).find( '.lipath' ).text() === name;
} );
$libmode.detach();
$( '#lib-mode-list' ).append( $libmode );
if ( !G.display.order ) return

$.each( G.display.order, function( i, name ) {
var $libmode = $( '.lib-mode' ).filter( function() {
return $( this ).find( '.lipath' ).text() === name;
} );
}
$libmode.detach();
$( '#lib-mode-list' ).append( $libmode );
} );
}
function playlistInsert( indextarget ) {
var plname = $( '#pl-path .lipath' ).text();
Expand Down Expand Up @@ -873,9 +861,9 @@ function renderLibraryList( data ) {
if ( G.mode === 'webradio' ) htmlpath += '<i class="button-webradio-new fa fa-plus-circle"></i>';
$( '#button-lib-search' ).addClass( 'hide' );
} else { // dir breadcrumbs
var dir = data.modetitle.split( '/' );
var dir = data.path.split( '/' );
var dir0 = dir[ 0 ];
var htmlpath = '<i class="fa fa-'+ dir0.toLowerCase() +'"></i>';
var htmlpath = '<i class="x fa fa-'+ dir0.toLowerCase() +'"></i>';
htmlpath += '<a>'+ dir0 +'/<span class="lidir">'+ dir0 +'</span></a>';
var lidir = dir0;
var iL = dir.length;
Expand Down Expand Up @@ -950,6 +938,10 @@ function renderLibraryList( data ) {
.removeClass( 'bars-on' )
.css( 'height', pH + 49 - coverH );
}
if ( !G.display.hidecover ) {
var limode = [ 'file', 'sd', 'nas', 'usb' ].indexOf( G.mode ) === -1 ? G.mode : 'infopath';
$( '.licover .li'+ limode ).hide();
}
} );
if ( G.color ) {
$( '#lib-list li:eq( 0 )' ).tap();
Expand Down
21 changes: 13 additions & 8 deletions srv/http/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1430,9 +1430,7 @@ $( '#lib-mode-list' ).on( 'tap', '.mode-bookmark', function( e ) { // delegate -
, fileoklabel : '<i class="fa fa-flash"></i>Replace'
, filetype : 'image/*'
, ok : function() {
imageReplace( imagefile, 'bookmark', function( ext ) {
bookmarkThumbReplace( $this, imagefile +'.'+ hash + ext );
} );
imageReplace( imagefile, 'bookmark' );
}
}
if ( thumbnail ) {
Expand Down Expand Up @@ -1631,26 +1629,32 @@ $( '#lib-list' ).on( 'taphold', '.licoverimg', function() {
contextmenuLibrary( $this, $target );
return
}

$this.addClass( 'active' );
var libpath = $( '#lib-path .lipath' ).text();
var path = $this.find( '.lipath' ).text();
var name = $this.find( '.liname' ).text();
var modetitle = G.mode.toUpperCase() +'<gr> • </gr><wh>'+ path +'</wh>';
var mode = $( this ).data( 'mode' );
// modes: file, sd, nas, usb, webradio, album, artist, albumartist, composer, genre
if ( [ 'file', 'sd', 'nas', 'usb' ].indexOf( mode ) !== -1 ) { // list by directory
var modetitle = path;
var query = {
query : 'ls'
, string : path
, format : [ 'file' ]
}
} else if ( mode !== 'album' ) { // list by mode (non-album)
if ( [ 'genre', 'composer', 'date' ].indexOf( G.mode ) !== -1 ) {
var format = [ 'album', 'artist' ];
} else if ( G.mode === 'conductor' ) {
var format = [ 'album', 'conductor' ];
} else {
var format = [ 'album' ];
}
var query = {
query : 'find'
, mode : G.mode
, string : path
, format : [ 'genre', 'composer', 'date' ].indexOf( G.mode ) !== -1 ? [ 'album', 'artist' ] : [ 'album' ]
, format : format
}
} else { // track list
if ( [ 'album', 'composer', 'date' ].indexOf( G.mode ) !== -1 ) {
Expand All @@ -1668,10 +1672,10 @@ $( '#lib-list' ).on( 'taphold', '.licoverimg', function() {
, format : [ 'album', 'artist' ]
}
}
} else if ( G.mode === 'genre' ) { // genre (entire album)
} else if ( G.mode === 'genre' || G.mode === 'conductor' ) { // genre (entire album)
var query = {
query : 'find'
, mode : [ 'album', 'artist' ]
, mode : [ 'album', G.mode === 'genre' ? 'artist' : 'conductor' ]
, string : [ name, path ]
}
} else { // artist, albumartist, composer (by album + mode)
Expand All @@ -1683,6 +1687,7 @@ $( '#lib-list' ).on( 'taphold', '.licoverimg', function() {
}
}
}
var modetitle = '<wh>'+ ( $( '#mode-title wh' ).text() || path ) +'</wh>';
G.scrolltop[ libpath ] = $( window ).scrollTop();
list( query, function( data ) {
data.path = path;
Expand Down
Loading

0 comments on commit dc56504

Please sign in to comment.