Skip to content

Commit 1c6091c

Browse files
authored
Merge pull request #2038 from rern/UPDATE
Update
2 parents aff743e + 005ca1c commit 1c6091c

8 files changed

Lines changed: 11 additions & 27 deletions

File tree

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ $dirbash/cmd.sh cachebust
6767

6868
installfinish
6969

70-
# 20260212
70+
# 20260216
7171
if [[ -e /mnt/SD ]]; then
7272
mv -f /mnt/{SD,USB} /mnt/MPD &> /dev/null
73-
ignoreMntDirs
73+
echo -e 'NVME\nSATA\nSD\nUSB' >> /mnt/MPD/.mpdignore
7474
sed -i 's|/mnt/USB|/mnt/MPD/USB|' /etc/udevil/udevil.conf
7575
systemctl restart devmon@http
7676
fi

srv/http/assets/js/system.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,9 @@ var UTIL = {
538538
, cancel : SWITCH.cancel
539539
, ok : () => {
540540
var infoval = _INFO.val();
541-
if ( ! shareddata && [ 'data', 'NVME', 'SATA', 'SD', 'USB' ].includes( infoval.NAME ) ) {
542-
var type = infoval.NAME == 'data' ? LABEL_ICON( 'Shared Data', 'networks' ) : LABEL_ICON( 'Server rAudio', 'nfsserver' );
543-
_INFO.warning( SW.icon, SW.title, 'Name <c>'+ infoval.NAME +'</c> reserved for '+ type, () => {
541+
var name = infoval.NAME;
542+
if ( ! shareddata && [ 'data', 'NVME', 'SATA', 'SD', 'USB' ].includes( name ) ) {
543+
_INFO.warning( SW.icon, SW.title, 'Name <c>'+ name +'</c> reserved for '+ ICON( 'networks' ) +' Shared Data', () => {
544544
UTIL.mount[ 'PROTOCOL' in values ? 'mount' : 'rServer' ]( infoval );
545545
} );
546546
return

srv/http/bash/common.sh

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -347,20 +347,6 @@ getVar() { # var=value
347347
grepr() {
348348
grep --color --exclude-dir plugin -Inr "$@" /srv
349349
}
350-
ignoreMntDirs() {
351-
local dir mpdignore
352-
for dir in NVME SATA SD USB; do
353-
mpdignore=/mnt/MPD/$dir/.mpdignore
354-
if [[ $1 == restore ]]; then
355-
for dir in NVME SATA SD USB; do
356-
sed -i "\|$dir| d" $mpdignore
357-
done
358-
[[ ! -s $mpdignore ]] && rm $mpdignore
359-
else
360-
echo $dir >> $mpdignore
361-
fi
362-
done
363-
}
364350
inOutputConf() {
365351
local file
366352
file=$dirmpdconf/output.conf
@@ -561,6 +547,7 @@ sharedDataLink() {
561547
chown -h http:http $dirdata/{audiocd,bookmarks,lyrics,webradio} $dirsystem/{display,order}.json
562548
chown -h mpd:audio $dirdata/{mpd,playlists} $dirmpd/mpd.db
563549
appendSortUnique $dirnas/.mpdignore data
550+
echo -e 'NVME\nSATA\nSD\nUSB' >> /mnt/MPD/.mpdignore
564551
[[ $1 == rserver && -e $dirshareddata/source ]] && return
565552
# --------------------------------------------------------------------
566553
readarray -t source <<< $( < $dirshareddata/source )
@@ -578,6 +565,9 @@ sharedDataReset() {
578565
mv -f $dirbackup/{display,order}.json $dirsystem
579566
mv -f $dirbackup/* $dirdata
580567
rm -rf $dirbackup
568+
mpdignore=/mnt/MPD/.mpdignore
569+
ignore=$( grep -Ev '^data$|^NVME$|^SATA$|^SD$|^USB$' $mpdignore )
570+
[[ $ignore ]] && echo "$ignore" > $mpdignore || rm $mpdignore
581571
dirPermissions
582572
}
583573
snapclientIP() {

srv/http/bash/settings/features.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ nfsserver )
210210
$dirbash/cmd.sh mpcremove
211211
systemctl stop mpd
212212
if [[ $ON ]]; then
213-
ignoreMntDirs
214213
for d in NVME SATA SD USB; do
215214
[[ -e /mnt/MPD/$d ]] && ln -s /mnt/MPD/$d $dirnas
216215
done
@@ -247,7 +246,6 @@ CMD ACTION PATHMPD"
247246
cp -rL $dirmpd $dirshared
248247
rm -rf $dirnas/data
249248
rm -f $dirnas/{NVME,SATA,SD,USB}
250-
ignoreMntDirs restore
251249
systemctl disable --now nfs-server
252250
> /etc/exports
253251
rm $filesharedip

srv/http/bash/settings/system-mount.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ fstabSet "$mountpoint" "${source// /\\040} ${mountpoint// /\\040} $PROTOCOL ${op
3737
if [[ $SHAREDDATA ]]; then
3838
mpc -q clear
3939
systemctl stop mpd
40-
ignoreMntDirs
4140
mkdir -p $dirbackup $dirshareddata
4241
if [[ ! -e $dirshareddata/mpd ]]; then
4342
rescan=1

srv/http/bash/settings/system.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ shareddatadisable ) # server rAudio / other server
407407
$dirbash/cmd.sh mpcremove
408408
systemctl stop mpd
409409
sed -i "/$( ipAddress )/ d" $filesharedip
410-
ignoreMntDirs restore
411410
if ! grep -q "$dirnas " /etc/fstab; then # other server
412411
fstab=$( grep -v $dirshareddata /etc/fstab )
413412
readarray -t source <<< $( awk '{print $2}' $dirshareddata/source )

srv/http/settings/features.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,9 @@
285285
· On enable:
286286
· 1st time: Library will be rescanned to a new database.
287287
· Previously enabled: Database from previous will be used.
288+
· $B->microsd SD and $B->usbdrive USB moved to $B->networks NAS
288289
· IP address - This rAudio must be set to static / fixed.
289290
· Password - If changed, must be the same on all clients.
290-
· In $T->library
291-
· $B->microsd SD and $B->usbdrive USB will be hidden.
292-
· $B->usbdrive USB items will be displayed in $B->networks NAS instead.
293291
294292
• <wh>Clients:</wh>
295293
· $T->system$L->shareddata <tab><i class="i-rserver"></i> rAudio</tab>

srv/http/settings/system.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ function hrefList( $list ) {
374374
<gr>(<c>SOURCE</c> will be arranged accordingly.)</gr>
375375
376376
Note:
377-
· $B->microsd SD and $B->usbdrive USB : Hidden while enabled
377+
· Enabled: $B->microsd SD and $B->usbdrive USB - Hidden
378378
379379
EOF
380380
]

0 commit comments

Comments
 (0)