8000 Commands · owncloud/music Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commands

Pauli Järvinen edited this page Apr 16, 2025 · 6 revisions

The Music app has many commands available in the occ command line utility. To list them all, execute in the root directory of your cloud installation (assuming your web-server uses username www-data)

sudo -u www-data php occ music

The commands available on Music v2.0.0 are the following

music:cleanup              clean up orphaned DB entries (this happens also periodically on the background)
music:playlist-export      export user playlist(s) to file(s)
music:playlist-import      import user playlist(s) from file(s)
music:podcast-add          add a podcast channel from an RSS feed
music:podcast-reset        remove all podcast channels of one or more users
music:podcast-update       update podcast channels of one or more users from their sources
music:register-mime-types  map following file extensions as audio MIME types: ["aac","au","aif","aiff","aifc","caf"]
music:reset-cache          drop data cached by the music app for performance reasons
music:reset-database       drop metadata indexed by the music app (artists, albums, tracks, playlists)
music:scan                 scan and index any unindexed audio files

For each command, you can get more information about the available options with the argument --help, e.g.

sudo -u www-data php occ music:scan --help

Details

The following is a non-exhaustive list of some of the possibilities to use some of the commands. Use the --help option for the comprehensive list of the arguments.

Scan music files

Scan all audio files not already indexed in the database. Extract metadata from those and insert it to the database. Target either specified user(s) or user group(s) or all users.

sudo -u www-data php occ music:scan USERNAME1 USERNAME2 ...
sudo -u www-data php occ music:scan --group=USERGROUP1 --group==USERGROUP2 ...
sudo -u www-data php occ music:scan --all

All the above commands can be combined with the --debug switch, which enables debug output and shows the memory usage of each scan step.

You can also supply the option --rescan-modified to scan the files which are already part of the collection but have been modified after they were previously scanned. This might be necessary, if some file update has been missed by the app because of some bug or because the admin has temporarily disabled the app.

The option --rescan may be passed to rescan all the audio files, regardless if they are already part of the collection or not.

Lastly, you can give option --clean-obsolete to make the process check all the previously scanned files, and clean up those which are no longer found. Again, this is usually handled automatically, but manually running the command could be necessary on some special cases.

Reset scanned metadata

Reset all data stored to the music database. Target either specified user(s) or user group(s) or all users.

Warning: This command will erase user-created data! It will remove all playlists as playlists are linked against the track metadata.

sudo -u www-data php occ music:reset-database USERNAME1 USERNAME2 ...
sudo -u www-data php occ music:reset-database --group=USERGROUP1 --group==USERGROUP2 ...
sudo -u www-data php occ music:reset-database --all

Reset cache

Music app caches some results for performance reasons. Normally, there should be no reason to reset this cache manually, but it might be desirable e.g. when running performance tests. Target either specified user(s) or user group(s) or all users.

sudo -u www-data php occ music:reset-cache USERNAME1 USERNAME2 ...
sudo -u www-data php occ music:reset-cache --group=USERGROUP1 --group==USERGROUP2 ...
sudo -u www-data php occ music:reset-cache --all
Clone this wiki locally
0