Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
e4a53df7
Commit
e4a53df7
authored
Jan 04, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't exit after --create-db
Start the daemon after --create-db. This makes --create-db a flag which discards the old database and starts with a fresh one.
parent
6fb8c549
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
15 deletions
+4
-15
NEWS
NEWS
+1
-0
mpd.1
doc/mpd.1
+1
-1
cmdline.c
src/cmdline.c
+1
-1
database.c
src/database.c
+0
-7
main.c
src/main.c
+1
-6
No files found.
NEWS
View file @
e4a53df7
...
...
@@ -13,6 +13,7 @@ ver 0.15 - (200?/??/??)
* fix minor memory leak in decoder_tag()
* added Icy-Metadata support
* fix cross-fading bug: it used to play some chunks of the new song twice
* --create-db starts the MPD daemon instead of exiting
ver 0.14 (2008/12/25)
* audio outputs:
...
...
doc/mpd.1
View file @
e4a53df7
...
...
@@ -26,7 +26,7 @@ Kill the currently running mpd session. The pid_file parameter must be
specified in the config file for this to work.
.TP
.BI --create-db
Force (re)creation of database
and exit
.
Force (re)creation of database.
.TP
.BI --no-create-db
Do not create database, even if it doesn't exist.
...
...
src/cmdline.c
View file @
e4a53df7
...
...
@@ -86,7 +86,7 @@ void parseOptions(int argc, char **argv, Options *options)
{
"kill"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
->
kill
,
"kill the currently running mpd session"
,
NULL
},
{
"create-db"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
option_create_db
,
"force (re)creation of database
and exit
"
,
NULL
},
"force (re)creation of database"
,
NULL
},
{
"no-create-db"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
option_no_create_db
,
"don't create database, even if it doesn't exist"
,
NULL
},
{
"no-daemon"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
option_no_daemon
,
...
...
src/database.c
View file @
e4a53df7
...
...
@@ -57,13 +57,6 @@ db_init(void)
ret
=
directory_update_init
(
NULL
);
if
(
ret
==
0
)
g_error
(
"directory update failed"
);
do
{
event_pipe_wait
();
}
while
(
isUpdatingDB
());
stats
.
numberOfSongs
=
countSongsIn
(
NULL
);
stats
.
dbPlayTime
=
sumSongTimesIn
(
NULL
);
}
void
...
...
src/main.c
View file @
e4a53df7
...
...
@@ -135,10 +135,6 @@ static void openDB(Options * options, char *argv0)
if
(
db_check
()
<
0
)
exit
(
EXIT_FAILURE
);
db_init
();
if
(
db_save
()
<
0
)
exit
(
EXIT_FAILURE
);
if
(
options
->
createDB
)
exit
(
EXIT_SUCCESS
);
}
}
...
...
@@ -238,8 +234,7 @@ int main(int argc, char *argv[])
tag_lib_init
();
log_init
(
options
.
verbose
,
options
.
stdOutput
);
if
(
options
.
createDB
<=
0
)
listenOnPort
();
listenOnPort
();
changeToUser
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment