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
2fb40fe7
Commit
2fb40fe7
authored
Feb 23, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist_state: add option "restore_paused"
When set, MPD will not auto-start playback on startup; it will be in "paused" state.
parent
b57330cf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
0 deletions
+18
-0
NEWS
NEWS
+1
-0
mpd.conf.5
doc/mpd.conf.5
+3
-0
mpdconf.example
doc/mpdconf.example
+5
-0
conf.c
src/conf.c
+1
-0
playlist_state.c
src/playlist_state.c
+8
-0
No files found.
NEWS
View file @
2fb40fe7
...
...
@@ -10,6 +10,7 @@ ver 0.17 (2011/??/??)
- osx: allow user to specify other audio devices
- raop: new output plugin
- shout: add possibility to set url
* state_file: add option "restore_paused"
ver 0.16.1 (2011/01/09)
...
...
doc/mpd.conf.5
View file @
2fb40fe7
...
...
@@ -69,6 +69,9 @@ mpd will be saved to this file when mpd is terminated by a TERM signal or by
the "kill" command. When mpd is restarted, it will read the state file and
restore the state of mpd (including the playlist).
.TP
.B restore_paused <yes or no>
Put MPD into pause mode instead of starting playback after startup.
.TP
.B user <username>
This specifies the user that MPD will run as, if set. MPD should
never run as root, and you may use this option to make MPD change its
...
...
doc/mpdconf.example
View file @
2fb40fe7
...
...
@@ -103,6 +103,11 @@
#
#gapless_mp3_playback "yes"
#
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#
#restore_paused "no"
#
# This setting enables MPD to create playlists in a format usable by other
# music players.
#
...
...
src/conf.c
View file @
2fb40fe7
...
...
@@ -59,6 +59,7 @@ static struct config_entry config_entries[] = {
{
.
name
=
CONF_LOG_FILE
,
false
,
false
},
{
.
name
=
CONF_PID_FILE
,
false
,
false
},
{
.
name
=
CONF_STATE_FILE
,
false
,
false
},
{
.
name
=
"restore_paused"
,
false
,
false
},
{
.
name
=
CONF_USER
,
false
,
false
},
{
.
name
=
CONF_GROUP
,
false
,
false
},
{
.
name
=
CONF_BIND_TO_ADDRESS
,
true
,
false
},
...
...
src/playlist_state.c
View file @
2fb40fe7
...
...
@@ -29,6 +29,7 @@
#include "queue_save.h"
#include "path.h"
#include "text_file.h"
#include "conf.h"
#include <string.h>
#include <stdlib.h>
...
...
@@ -196,6 +197,13 @@ playlist_state_restore(const char *line, FILE *fp, GString *buffer,
if
(
!
queue_valid_position
(
&
playlist
->
queue
,
current
))
current
=
0
;
if
(
state
==
PLAYER_STATE_PLAY
&&
config_get_bool
(
"restore_paused"
,
false
))
/* the user doesn't want MPD to auto-start
playback after startup; fall back to
"pause" */
state
=
PLAYER_STATE_PAUSE
;
/* enable all devices for the first time; this must be
called here, after the audio output states were
restored, before playback begins */
...
...
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