diff --git a/seqs/nextcloud.sh b/seqs/nextcloud.sh index 7fce9d3..c9e8c98 100755 --- a/seqs/nextcloud.sh +++ b/seqs/nextcloud.sh @@ -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