-
-
Notifications
You must be signed in to change notification settings - Fork 0
mpdev_cleanup.1
mpdev_cleanup - mpdev_cleanup stats / sticker mpd database entries
mpdev_cleanup [option]
mpdev_cleanup(1) cleans the stats.db or sticker.db sqlite database by removing entries that do not correspond to a valid path to a music file.
It can operate using either of the two modes below
1. Check the presence of a file on the disk (uses access(2) system call).
2. Check the presence of a file in mpd database (loads mpd database into memory)
Checking against the mpd(1) database is faster than using the access(2) call. However, if the mpd(1) database has not been updated, there could be entries in the mpd(1) database which do not correspond to any music file on the disk. You can use the mpc(1) update command to update the mpd(1) database before using the mpdev_cleanup(1) command.
Examples
# Use mpd database as reference
$ mpdev_cleanup -c -d /var/lib/mpd/MDrive/data/stats.db
$ mpdev_cleanup -C -d /var/lib/mpd/MDrive/data/sticker.db
# Use the filesystem as reference
$ mpdev_cleanup -c -m /var/lib/mpd/Music -d /var/lib/mpd/MDrive/data/stats.db
$ mpdev_cleanup -C -m /var/lib/mpd/Music -d /var/lib/mpd/MDrive/data/sticker.db
-v
Set verbose output. You can increase verbosity by specifying it multiple
times
-i IP
IP address of mpd host if different from localhost
-p port
port on which mpd(1) is listening if different from 6600
-s unix_socket
Unix domain socket in case you don't want to use IP and port
-d db_file_path
full path to the sqlite3(1) stats database
-m music_directory
Full path to the music_directory in the mpd.conf(5) configuration
file.
-c
Clean entries from the stats.db sqlite database
-C
Clean entries from the sticker.db sqlite database
If you find a bug, please report it at https://github.com/mbhangui/mpdev/issues
Copyright (c) 2020 Manvendra Bhangui <mpdev@indimail.org>
Free use of this software is granted under the terms of the GNU General Public License (GPLv2).
Manvendra Bhangui <manvendra@indimail.org>
mpd(1) mpc(1) sqlite3(1) mpdev(1), mpdev_update(1), access(2)