implements the smartstop feature

The smartstop feature is a way to tell mpd to stop playing after
current song.
This patche provides:
- 'state' command returns 'smartstop' state (1 or 0)
- 'smartstop' can activate or not the smartstop state
- when song is terminated, mpd stops playing and smartstop is set to 0
This commit is contained in:
Romain Bignon
2009-03-27 14:42:55 +01:00
parent 929c200c38
commit e46722b2eb
8 changed files with 87 additions and 2 deletions

View File

@@ -216,6 +216,12 @@
<returnvalue>0 or 1</returnvalue>
</para>
</listitem>
<listitem>
<para>
<varname>smartstop</varname>:
<returnvalue>0 or 1</returnvalue>
</para>
</listitem>
<listitem>
<para>
<varname>playlist</varname>:
@@ -402,6 +408,21 @@
</para>
</listitem>
</varlistentry>
<varlistentry id="command_smartstop">
<term>
<cmdsynopsis>
<command>smartstop</command>
<arg choice="req"><replaceable>STATE</replaceable></arg>
</cmdsynopsis>
</term>
<listitem>
<para>
Sets smartstop state to <varname>STATE</varname>,
<varname>STATE</varname> should be 0 or 1.
When smartstop is activated, playback is stopped after current song.
</para>
</listitem>
</varlistentry>
<varlistentry id="command_volume">
<term>
<cmdsynopsis>