Step to reset and rescan the autioplayer library in the background
This commit is contained in:
@@ -61,5 +61,22 @@ step_100() {
|
||||
endReturn -o $? "Error deleting ip $ip"
|
||||
}
|
||||
|
||||
VERSION_SEQREV=10
|
||||
step_102_info() { echo "Reset and rescan the music library in the background"; }
|
||||
step_102_alias() { ALIAS="audioreset"; }
|
||||
step_102() {
|
||||
shift
|
||||
local ncUser=$1
|
||||
local lOcc="sudo -u www-data php $NC_INSTALL_DIR/occ"
|
||||
|
||||
if [ -z "$ncUser" ] ; then
|
||||
echoerr " [E] Reset only for single user"
|
||||
return 1
|
||||
fi
|
||||
|
||||
exep "sudo -u www-data php \"$NC_INSTALL_DIR/occ\" audioplayer:reset $ncUser > /var/log/ncAudioRescan.log"
|
||||
echoseq " [I] Rescan audioplayer database for user $ncUser"
|
||||
exep "sudo -u www-data php \"$NC_INSTALL_DIR/occ\" audioplayer:scan -vvvv $ncUser >> /var/log/ncAudioRescan.log &"
|
||||
}
|
||||
|
||||
VERSION_SEQREV=13
|
||||
. /usr/local/bin/sequencer.sh
|
||||
|
Reference in New Issue
Block a user