I have written a tool that downloads m4a files from internet and copies the downloaded m4a file to my Music folder of Nextcloud data. I set the file ownership and group to www-data:www-data.
Now after clicking on the above notification runs some command in background and the newly added song starts showing up in the Music app.
My question here is what this command is that run in the background that the newly added song starts showing up in the music app so I straight away run that instea of running files:scan
~# occ music:scan --help
Description:
scan and index any unindexed audio files
Usage:
music:scan [options] [--] [<user_id>...]
Arguments:
user_id specify one or more targeted users
Options:
--all target all known users
--group=GROUP specify a targeted group to include all users of that group (multiple values allowed)
--debug will run the scan in debug mode (memory usage)
--clean-obsolete also check availability of any previously scanned tracks, removing obsolete entries
--rescan rescan also any previously scanned tracks
--rescan-modified rescan files which have mofication time later than the previous scan time (new files not scanned)
--folder[=FOLDER] scan only files within this folder (path is relative to the user home folder)
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
first, you name a user seaurchin and then the path, where the user is seaurchiin (with double i)
For the occ files:scan, when a path is given, it reads the user from the path and no user must be attached as argument in the command line.
this is what occ files:scan --help says about it:
-p, --path=PATH limit rescan to this path, eg. --path="/alice/files/Music", the user_id is determined by the path and the user_id parameter and --all are ignored
In addition, the options (such as –path= and -n) should be first, folowed ba -- and then the arguments (uid or --all)