Skip to content

Commit

Permalink
Merge pull request #954 from rern/UPDATE
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
rern authored Jun 25, 2022
2 parents 6c96d7d + 6ace5e8 commit 48c7288
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 83 deletions.
1 change: 0 additions & 1 deletion etc/conf.d/devmon

This file was deleted.

7 changes: 0 additions & 7 deletions etc/systemd/system/bluealsa-dbus.service

This file was deleted.

7 changes: 0 additions & 7 deletions etc/systemd/system/bluealsa.service.d/override.conf

This file was deleted.

12 changes: 0 additions & 12 deletions etc/systemd/system/bluetooth.service.d/override.conf

This file was deleted.

3 changes: 0 additions & 3 deletions etc/systemd/system/camilladsp.service.d/override.conf

This file was deleted.

2 changes: 0 additions & 2 deletions etc/udev/rules.d/bluetooth.rules

This file was deleted.

2 changes: 0 additions & 2 deletions etc/udev/rules.d/ntfs3.rules

This file was deleted.

2 changes: 0 additions & 2 deletions etc/udev/rules.d/usbdac.rules

This file was deleted.

2 changes: 0 additions & 2 deletions etc/udev/rules.d/usbwifi.rules

This file was deleted.

31 changes: 0 additions & 31 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,10 @@ if grep -q 'format: *$' $file; then
sed -i "s/format: *$/format: $format/" $file
fi

# 20220527
if [[ $( pacman -Q camilladsp 2> /dev/null ) == 'camilladsp 0.6.3-1' ]]; then
systemctl stop camilladsp camillagui
pacman -R --noconfirm camillagui
pacman -Sy --noconfirm camilladsp camillagui-backend python-pycamilladsp python-pycamilladsp-plot
rm -rf /srv/http/settings/camillagui/build
mkdir /srv/http/settings/camillagui/build
ln -sf /srv/http/assets/fonts /srv/http/settings/camillagui/build
fi
if grep -q 'force user = mpd' /etc/samba/smb.conf; then
sed -i 's/\(force user = \).*/\1http/' /etc/samba/smb.conf
systemctl try-restart smb
fi

. /srv/http/bash/addons.sh

installstart "$1"

getinstallzip

# 20220522
if [[ -e /srv/http/bash/features.sh ]]; then
echo 'PATH+=:/srv/http/bash:/srv/http/bash/settings:/opt/vc/bin' > /root/.profile
rm -f /srv/http/bash/{features*,networks*,player*,relays.*,relays-data*,system*}
fi

# 20220528
chmod +x /srv/http/bash/cmd.sh
/srv/http/bash/cmd.sh dirpermissions

udevadm control --reload-rules
udevadm trigger

systemctl daemon-reload
systemctl try-restart bluetooth
systemctl restart mpd

installfinish
2 changes: 1 addition & 1 deletion srv/http/assets/css/info.css
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ hr {
}
#infoTab a.active {
background: var( --cga );
border-radius: 5px 5px 0 0;
border-radius: 6px 6px 0 0;
}
#infoContent {
padding: 20px 10px 10px 10px;
Expand Down
13 changes: 10 additions & 3 deletions srv/http/assets/js/context.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function addReplace( cmd, command, title, msg ) {
if ( cmd === 'addplay' || cmd === 'replaceplay' || cmd === 'replace' ) $( '#stop' ).click();
console.log(command);
bash( command, function() {
if ( !G.display.playbackswitch ) return

Expand Down Expand Up @@ -361,7 +362,8 @@ function webRadioCoverart() {
if ( coverart !== G.coverdefault ) {
var imagefilenoext = coverart.slice( 0, -15 );
} else {
var url = G.list.li.find( '.lipath' ).text().replace( /.*(http.*:)/, '$1' );
var pathsplit = G.list.li.find( '.lipath' ).text().split( '//' );
var url = pathsplit[ 0 ].replace( /.*\//, '' ) +'//'+ pathsplit[ 1 ];
var imagefilenoext = '/data/webradiosimg/'+ url.replace( /\//g, '|' );
}
imageReplace( '/srv/http'+ imagefilenoext, 'webradio' );
Expand Down Expand Up @@ -403,7 +405,8 @@ var htmlwebradio = `\
function webRadioEdit() {
var name = G.list.name;
var img = G.list.li.find( 'img' ).attr( 'src' ) || G.coverdefault;
var url = G.list.path.replace( /.*(http.*:)/, '$1' )
var pathsplit = G.list.path.split( '//' );
var url = pathsplit[ 0 ].replace( /.*\//, '' ) +'//'+ pathsplit[ 1 ];
var charset = G.list.li.data( 'charset' );
info( {
icon : 'webradio'
Expand Down Expand Up @@ -680,7 +683,11 @@ $( '.contextmenu a, .contextmenu .submenu' ).click( function() {
}

// replaceplay|replace|addplay|add //////////////////////////////////////////
var path = G.mode !== 'webradio' ? G.list.path : G.list.path.replace( /.*(http.*:)/, '$1' );
var path = G.list.path;
if ( G.mode === 'webradio' ) {
var pathsplit = path.split( '//' );
path = pathsplit[ 0 ].replace( /.*\//, '' ) +'//'+ pathsplit[ 1 ];
}
var mpccmd;
// must keep order otherwise replaceplay -> play, addplay -> play
var mode = cmd.replace( /replaceplay|replace|addplay|add/, '' );
Expand Down
13 changes: 10 additions & 3 deletions srv/http/assets/js/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,18 @@ function infoLibrary( page1 ) {
, messagealign : 'left'
, checkbox : checkbox
, checkcolumn : page1 ? 1 : ''
, noreload : !$( '#infoOverlay' ).hasClass( 'hide' )
, values : values
, checkchanged : 1
, beforeshow : function() {
var active1 = page1 ? 'class="active"' : '';
var active2 = page1 ? '' : 'class="active"';
$( '#infoContent' ).before( '<div id="infoTab"><a '+ active1 +' style="width: 50%">Show</a><a '+ active2 +' style="width: 50%">Options</a></div>' );
var htmltab = '<a '+ active1 +' style="width: 50%">Show</a><a '+ active2 +' style="width: 50%">Options</a>';
if ( !$( '#infoTab' ).length ) {
$( '#infoContent' ).before( '<div id="infoTab">'+ htmltab +'</div>' );
} else {
$( '#infoTab' ).html( htmltab );
}
$( '#infoTab a' ).click( function() {
if ( !$( this ).hasClass( 'active' ) ) page1 ? infoLibrary() : infoLibrary( 1 );
} );
Expand Down Expand Up @@ -972,7 +978,6 @@ function renderLibrary() {
$( '#lib-path' ).css( 'max-width', '' );
$( '#lib-title, #lib-path>i, #button-lib-search' ).removeClass( 'hide' );
$( '#lib-path .lipath' ).empty()
$( '#button-lib-back' ).toggleClass( 'back-left', G.display.backonleft );
$( '#lib-breadcrumbs, #lib-search, #lib-index, #button-lib-back' ).addClass( 'hide' );
$( '#lib-search-close' ).empty();
$( '#lib-search-input' ).val( '' );
Expand Down Expand Up @@ -1012,7 +1017,9 @@ function renderLibraryCounts() {
function renderLibraryList( data ) {
G.librarylist = 1;
$( '#lib-title, #lib-mode-list, .menu' ).addClass( 'hide' );
$( '#button-lib-back' ).toggleClass( 'hide', data.modetitle === 'search' );
$( '#button-lib-back' )
.toggleClass( 'back-left', G.display.backonleft )
.toggleClass( 'hide', data.modetitle === 'search' );
$( '#lib-path .lipath' ).text( data.path );
if ( 'count' in data && G.mode !== 'latest' ) {
$( '#lib-path' ).css( 'max-width', 40 );
Expand Down
2 changes: 2 additions & 0 deletions srv/http/assets/js/passive.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ function psCoverart( data ) {
bannerHide();
}
function psDisplay( data ) {
console.log(data)
if ( 'submenu' in data ) {
G.display[ data.submenu ] = data.value;
displaySubMenu();
Expand Down Expand Up @@ -293,6 +294,7 @@ function psDisplay( data ) {
}, 'json' );
}
}
$( '#button-lib-back' ).toggleClass( 'back-left', G.display.backonleft );
}
}
function psEqualizer( data ) {
Expand Down
2 changes: 1 addition & 1 deletion srv/http/bash/settings/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ dtparam=audio=on"
pushReboot 'Audio I&#178;S module' i2saudio
;;
journalctl )
filebootlog=$dirdata/tmp/bootlog
filebootlog=/tmp/bootlog
if [[ -e $filebootlog ]]; then
journal=$( cat $filebootlog )
else
Expand Down
5 changes: 3 additions & 2 deletions srv/http/mpdplaylist.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ function htmlPlaylist( $lists, $plname = '' ) {
.'</li>';
$countupnp++;
} else {
if ( substr( $file, 0, 4 ) === 'http' ) { // webradio
if ( str_contains( $file, '://' ) ) { // webradio
$urlname = str_replace( '/', '|', $file );
$fileradio = '/srv/http/data/webradios/'.$urlname;
$stationname = file_exists( $fileradio ) ? exec( 'head -1 "'.$fileradio.'"' ) : '';
if ( !file_exists( $fileradio ) ) $fileradio = exec( 'find /srv/http/data/webradios -name "'.$urlname.'" | head -1' );
$stationname = $fileradio ? exec( 'head -1 "'.$fileradio.'"' ) : '';
} else {
$urlname = str_replace( '#', '%23', $list->urlname );
$stationname = '';
Expand Down
1 change: 1 addition & 0 deletions srv/http/settings/camillagui/build/camillagui.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ body {
padding: 20px 0;
text-align: right;
background: #000000;
z-index: 1;
}
#divhelp a {
color: var( --cml );
Expand Down
2 changes: 1 addition & 1 deletion srv/http/settings/camillagui/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><title>CamillaDSP</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,viewport-fit=cover"><link rel="icon" href="./icon.png?v=1655539916"><script defer="defer" src="./static/js/main.js?v=1655539916"></script><link href="./static/css/main.css?v=1655539916" rel="stylesheet"></head><body style="display:none"><div id="root"></div><link rel="stylesheet" href="./colors.css?v=1655539916"><link rel="stylesheet" href="./camillagui.css?v=1655539916"></body></html>
<!doctype html><html lang="en"><head><title>CamillaDSP</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,viewport-fit=cover"><link rel="icon" href="./icon.png?v=1655697564"><script defer="defer" src="./static/js/main.js?v=1655697564"></script><link href="./static/css/main.css?v=1655697564" rel="stylesheet"></head><body style="display:none"><div id="root"></div><link rel="stylesheet" href="./colors.css?v=1655697564"><link rel="stylesheet" href="./camillagui.css?v=1655697564"></body></html>
4 changes: 2 additions & 2 deletions srv/http/settings/camillagui/build/static/js/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion srv/http/settings/camillagui/build/static/js/main.js.map

Large diffs are not rendered by default.

0 comments on commit 48c7288

Please sign in to comment.