-
-
Notifications
You must be signed in to change notification settings - Fork 0
mpdev_update.1
mpdev_update - Update stats, sticker sqlite db from mpd database
mpdev_update [option]
mpdev_update creates/updates stats.db or sticker.db from the mpd(1) database. It sends the listinfo command to mpd to get list of all music files. mpdev_update uses the %mtime% tag for a file from the mpd(1) database.
-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
-D 0 | 1
0 to insert new records in stats.db, 1 to insert new records in
sticker.db
-U
Use update mode. The default is to use insert mode.
-j
Puts the journal in volatile memory. This saves disk I/O but at the
expense of database safety and integrity. If the application using
SQLite crashes in the middle of a transaction when the MEMORY journaling
mode is set, then the database file will very likely go corrupt.
-t
Turns on transaction mode at the beginning. This improves performance.
But if the application crashes in the middle, all new changes will be
lost
-S
Turns Off synchronous mode. With synchronous OFF, mpdev_update
continues without syncing as soon as it has handed data off to the
operating system. In case mpdev_update crashes, the data will be
safe, but the database might become corrupted if the operating system
crashes or the computer loses power before that data has been written to
the disk. On the other hand, commits can be orders of magnitude faster
with synchronous OFF.
-P
Print SQL statements used during db creation
Examples 1. create stats.db in the current directory
$ mpdev_update -S -j -t -D 0 -d stats.db
Processed 42630 rows, Failures 0 rows, Updated 42636 rows
real 0m0.830s
user 0m0.405s
sys 0m0.096s
2. Update stats.db in the current directory and add 6 new songs
$ mpdev_update -S -j -t -D 0 -d stats.db
Processed 42636 rows, Failures 0 rows, Updated 6 rows
real 0m0.725s
user 0m0.353s
sys 0m0.067s
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) sqlite3(1) mpdev_cleanup(1), mpdev(1),