Skip to content

Commit

Permalink
Merge pull request #1049 from rern/UPDATE
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
rern authored Oct 7, 2022
2 parents b298640 + 6406c32 commit 6fb4c50
Show file tree
Hide file tree
Showing 54 changed files with 1,583 additions and 1,151 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Audio player for

- A new release after [**R+R e6**](https://www.runeaudio.com/forum/runeaudio-r-e6-t7141.html)
- Based on Arch Linux Arm - `mpd` `nginx`
- Share data and files between multiple rAudios
- Server rAudio : clients (Easy setup with server IP address only)
- File server : clients
- Live data update - refresh across all rAudios
- Control via GUI on any browsers
- Live display update - refresh across multiple GUI clients
- Metadata Tag Editor - `kid3-cli`
- Album mode with coverarts
- File mode with thumbnail icons
Expand All @@ -21,7 +27,6 @@ Audio player for
- `*.wav` - album artists and sort tracks
- `*.cue` - virtually as individual tracks in all modes and user playlists
- VU meter as coverart (for remote screen)
- Live display update across multiple clients
- Wi-Fi connection can be pre-configured for headless mode.
- Access point - `hostapd`
- File sharing - `samba`
Expand All @@ -43,8 +48,8 @@ Audio player for
- Bluetooth audio sender
- HTTP (no metadata)
- SnapSever - `snapcast` Multiroom audio server
- Internet radio
- DAB radio
- Web Radio
- DAB Radio
- Digital Signal Processors
- DSP - `camilladsp`
- Equalizer - `alsaequal`
Expand Down
9 changes: 0 additions & 9 deletions etc/udev/rules.d/bluetooth.rules

This file was deleted.

9 changes: 0 additions & 9 deletions etc/udev/rules.d/usbbluetooth.rules

This file was deleted.

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

This file was deleted.

114 changes: 62 additions & 52 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,68 @@

alias=r1

# 20221005
dir=/srv/http/shareddata
dirshareddata=/mnt/MPD/NAS/data
filesharedip=$dirshareddata/sharedip
if [[ -e $dir ]]; then
if [[ -e $filesharedip ]]; then
list=$( cat $filesharedip )
else
echo data > /mnt/MPD/NAS/.mpdignore
mkdir -p $dirshareddata
list=$( grep $dir /etc/fstab | sed 's|^//||; s|/.*||; s|:.*||' )
fi
echo "\
$list
$( ifconfig | grep -m1 inet.*broadcast | awk '{print $2}' )" | sort -u > $filesharedip
chmod 777 $filesharedip
umount -l $dir
sed -i "s|$dir|$dirshareddata|" /etc/fstab
systemctl daemon-reload
mount $dirshareddata
rmdir $dir
fi

[[ -e /srv/http/data/system/hddspindown ]] && mv /srv/http/data/system/{hddspindown,apm}

if [[ ! -e /boot/kernel.img ]]; then
dir=/etc/systemd/system
for file in $dir/spotifyd.service $dir/upmpdcli.service; do
! grep -q CPUAffinity $file && sed -i -e '/Service/ a\CPUAffinity=3' -e '/ExecStartPost/ d' -e 's|/usr/bin/taskset -c 3 ||' $file
done
for file in $dir/mpd.service.d/override.conf $dir/shairport-sync.service.d/override.conf; do
! grep -q CPUAffinity $file && sed -i -e '/Service/ a\CPUAffinity=3' -e '/ExecStart/ d' $file
done
for file in $dir/bluealsa.service.d/override.conf $dir/bluetooth.service.d/override.conf; do
! grep -q CPUAffinity $file && sed -i -e '/Service/ a\CPUAffinity=3' $file
done
fi

dir=/srv/http/assets/img/guide
if [[ ! -e $dir/1.jpg ]]; then
mkdir -p $dir
if [[ -e /srv/http/assets/img/1.jpg ]]; then
find /srv/http/assets/img -maxdepth 1 -type f -name '[0-9]*' -exec mv {} $dir \;
else
curl -skL https://github.com/rern/_assets/raw/master/guide/guide.tar.xz | bsdtar xf - -C $dir
fi
fi

file=/etc/systemd/system/dab.service
if [[ -e /usr/bin/rtl_sdr && ! -e $file ]]; then
echo "\
[Unit]
Description=DAB Radio metadata
[Service]
Type=simple
ExecStart=/srv/http/bash/status-dab.sh
" > $file
fi

systemctl daemon-reload

# 20220916
dirmpd=/srv/http/data/mpd
if (( $( cat $dirmpd/counts | wc -l ) == 1 )); then
Expand All @@ -17,36 +79,6 @@ fi
# 20220826
rm /srv/http/bash/{camilladsp*,features*,networks*,player*,relays*,system*} &> /dev/null

# 20220814
sed -i '/bluez-utils/ d' /etc/pacman.conf

# 20220808
dirdata=/srv/http/data

dab=$( pacman -Q dab-scanner 2> /dev/null )
if [[ $dab && $dab != 'dab-scanner 0.8-3' ]]; then
rm -f /etc/rtsp-simple-server.yml $dirdata/webradiosimg/{dablogo*,rtsp*8554*}
rm -rf /srv/http/bash/dab $dirdata/webradios/DAB
pacman -Sy --noconfirm dab-scanner
fi

if [[ -e $dirdata/webradios ]]; then
mv $dirdata/webradio{s,}
mv $dirdata/{webradiosimg,webradio/img}
fi

grep -A1 'plugin.*ffmpeg' /etc/mpd.conf | grep -q no && sed -i '/decoder/,+4 d' /etc/mpd.conf

if [[ $( uname -m ) == armv6l && $( uname -r ) != 5.10.92-2-rpi-legacy-ARCH ]]; then
echo Downgrade kernel to 5.10.92 ...
pkgfile=linux-rpi-legacy-5.10.92-2-armv6h.pkg.tar.xz
curl -skLO https://github.com/rern/_assets/raw/master/$pkgfile
pacman -U --noconfirm $pkgfile
rm $pkgfile
fi

grep -q gpio-poweroff /boot/config.txt && sed -i '/gpio-poweroff\|gpio-shutdown/ d' /boot/config.txt

#-------------------------------------------------------------------------------
. /srv/http/bash/addons.sh

Expand All @@ -60,25 +92,3 @@ $dirbash/cmd.sh dirpermissions

installfinish
#-------------------------------------------------------------------------------

# 20220808
udevadm control --reload-rules
udevadm trigger

if grep -q /srv/http/shareddata /etc/fstab; then
echo -e "\
$info Shared data:
• Disable
• On server
- Rename: $( tcolor webradios 1 ) > $( tcolor webradio 2 )
- Move: $( tcolor webradiosimg 1 ) > $( tcolor webradio/img 2 )
• Re-enable again.
"
fi

if [[ -e /usr/bin/rtsp-simple-server && ! -e $dirdata/dabradio ]]; then
echo -e "\
$info DAB Radio:
• Rescan for stations again.
"
fi
10 changes: 5 additions & 5 deletions srv/http/assets/css/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
--cgd : hsl(200,3%,10%); /* gray-dark */
}

bl,.bl { color : var( --cm ) !important }
bl, .bl { color : var( --cm ) !important }
bll { color : var( --cml ) !important }
gr, .gr { color : var( --cg60 ) !important }
g { color : var( --cgl ) }
gr, .gr { color : var( --cg60 ) !important }
grn, .grn { color : #0f0 }
red, .red { color : #bb2828 }
pre red { color: #ff0000 }
.yl { color : yellow }
wh, .wh { color : var( --cw ) !important }
yl, .yl { color : yellow }
wh, .wh { color : var( --cw ) !important }

.bgr { background : var( --cgd ) !important }
.bgr60 { background-color : var( --cg60 ) !important }
3 changes: 2 additions & 1 deletion srv/http/assets/css/common.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@font-face {
font-family: rern;
src: url( '/assets/fonts/rern.2022091500.woff2' ) format( 'woff2' );
src: url( '/assets/fonts/rern.2022100300.woff2' ) format( 'woff2' );
font-display: block;
font-style: normal;
font-weight: normal;
Expand Down Expand Up @@ -207,6 +207,7 @@ input::-moz-focus-inner {
.fa-radioparadise::after {content: '\f594'; position: relative; }
.fa-random::before { content: '\f512' }
.fa-raudiobox::before { content: '\f53B' }
.fa-rserver::before { content: '\f53C' }
.fa-reboot::before { content: '\f521' }
.fa-redo::before { content: '\f524' }
.fa-refresh::before { content: '\f526' }
Expand Down
25 changes: 16 additions & 9 deletions srv/http/assets/css/info.css
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,13 @@ hr {
color: var( --cg60 );
background: none;
}
.infomessage {
user-select: text;
-webkit-user-select: text;
}
.infomessage pre {
font-size: 16px;
}
.infomessage,
.infofooter {
width: fit-content;
Expand Down Expand Up @@ -600,14 +607,14 @@ hr {
box-shadow: 0 0 2px 1px var( --cgl ) !important;
}
}
/* iOS only */
@media not all and ( min-resolution:.001dpcm ) {
@supports ( -webkit-appearance:none ) and ( stroke-color:transparent ) {
#infoOverlay input[type=checkbox]:checked:disabled {
background-color: var( --cml );
}
.infobtn {
line-height: 32px;
}
@supports ( -webkit-touch-callout: none ) { /* ios only */
#infoOverlay input[type=checkbox]:checked:disabled {
background-color: var( --cml );
}
.infobtn {
line-height: 32px;
}
::placeholder {
color: var( --cg );
}
}
2 changes: 1 addition & 1 deletion srv/http/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ i.map.disabled, .map.disabled i {
line-height: 60px;
}
.mode gr {
margin-left: 5px;
margin-left: 8px;
}
.nolabel {
padding-top: 25px;
Expand Down
Loading

0 comments on commit 6fb4c50

Please sign in to comment.