Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Update or Re-Gen MPD Database from Command Line
#3
(12-15-2019, 02:44 PM)normand Wrote: What is the command to update or re-gen the MPD Database from the command line?

I have an script to sync music/podcast files and need to update the database once new files are added/removed.


Try the mpc command; it's chock-full of goodness. Here's a snippet of its help output. Note 'mpc update' and 'mpc rescan'.

Code:
pi@moodeLR:~ $ mpc help
Usage: mpc [options] <command> [<arguments>]
mpc version: 0.31

Options:
 -v, --verbose                   Give verbose output
 -q, --quiet                     Suppress status message
 -q, --no-status                 synonym for --quiet
 -h, --host=<host>               Connect to server on <host>
 -P, --password=<password>       Connect to server using password <password>
 -p, --port=<port>               Connect to server port <port>
 -f, --format=<format>           Print status with format <format>
 -w, --wait                      Wait for operation to finish (e.g. database update)
 -r, --range=[<start>]:[<end>]   Operate on a range (e.g. when loading a playlist)

Commands:
 mpc                                                   Display status
...
 mpc update [<path>]                                   Scan music directory for updates
 mpc rescan [<path>]                                   Rescan music directory (including unchanged files)
...

See man 1 mpc for more information about mpc commands and options



Regards,
Kent
Reply


Messages In This Thread
RE: Update or Re-Gen MPD Database from Command Line - by TheOldPresbyope - 12-15-2019, 04:12 PM

Forum Jump: