-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpdev_update.1
135 lines (115 loc) · 2.9 KB
/
mpdev_update.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
.TH mpdev_update 1 "December 23, 2009" "manual"
.SH NAME
.PP
mpdev_update - Update stats, sticker sqlite db from mpd database
.SH SYNOPSIS
.PP
mpdev_update [\f[I]option\f[]]
.SH DESCRIPTION
.PP
\fBmpdev_update\fR creates/updates stats.db or sticker.db from the
\fBmpd\fR(1) database. It sends the \fIlistinfo\fR command to mpd to
get list of all music files. \fBmpdev_update\fR uses the \fI%mtime%\fR
tag for a file from the mpd(1) database.
.SH OPTIONS
.TP 3
.B -v
Set verbose output. You can increase verbosity by specifying it multiple times
.RS
.RE
.TP 3
\fB-i\fR \fIIP\fR
IP address of mpd host if different from localhost
.RS
.RE
.TP 3
\fB-p\fR \fIport\fR
port on which mpd(1) is listening if different from 6600
.RS
.RE
.TP 3
\fB-s\fR \fIunix_socket\fR
Unix domain socket in case you don't want to use \fIIP\fR and \fIport\fR
.RS
.RE
.TP 3
\fB-d\fR \fIdb_file_path\fR
full path to the sqlite3(1) stats database
.RS
.RE
.TP 3
\fB-D\fR \fI0\fR | \fI1\fR
0 to insert new records in stats.db, 1 to insert new records in sticker.db
.RS
.RE
.TP 3
.B -U
Use update mode. The default is to use insert mode.
.RS
.RE
.TP 3
\fB-j\fR
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.
.RS
.RE
.TP 3
\fB-t\fR
Turns on transaction mode at the beginning. This improves performance. But if
the application crashes in the middle, all new changes will be lost
.RS
.RE
.TP 3
\fB-S\fR
Turns Off synchronous mode.
With synchronous OFF, \fBmpdev_update\fR continues without syncing as soon
as it has handed data off to the operating system. In case \fBmpdev_update\fR
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.
.RS
.RE
.TP 3
\fB-P\fR
Print SQL statements used during db creation
.RS
.RE
Examples
1. create stats.db in the current directory
.EX
$ 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
.EE
2. Update stats.db in the current directory and add 6 new songs
.EX
$ 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
.EE
.SH REPORTING BUGS
.PP
If you find a bug, please report it at https://github.com/mbhangui/mpdev/issues
.SH COPYRIGHT
.PP
Copyright (c) 2020 Manvendra Bhangui <[email protected]>
.PD 0
.P
.PD
Free
use of this software is granted under the terms of the GNU General
Public License (GPLv2).
.SH AUTHOR
Manvendra Bhangui <[email protected]>
.SH SEE ALSO
mpd(1),
sqlite3(1),
mpdev_cleanup(1),
mpdev(1)