'playid "-1"' now resumes playback if paused

This commit is contained in:
Stein Magnus Jodal 2010-10-24 20:49:57 +02:00
parent c9535ffe10
commit ff616f3a0a
2 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,7 @@ No description yet.
:issue:`24`, contributes to :issue:`14`)
- Improved handling of uncaught exceptions in threads. The entire process
should now exit immediately.
- MPD command ``playid "-1"`` now correctly resumes playback if paused.
0.1.0 (2010-08-23)

View File

@ -138,6 +138,10 @@ def playid(frontend, cpid):
at the first track.
"""
cpid = int(cpid)
paused = (frontend.backend.playback.state ==
frontend.backend.playback.PAUSED)
if cpid == -1 and paused:
return frontend.backend.playback.resume()
try:
if cpid == -1:
cp_track = _get_cp_track_for_play_minus_one(frontend)