call playback.next if we try to delete current playing track

This commit is contained in:
Johannes Knutsen 2010-08-13 19:56:25 +02:00
parent 635791cf0e
commit 382caba05a

View File

@ -83,6 +83,8 @@ def deleteid(frontend, cpid):
""" """
try: try:
cpid = int(cpid) cpid = int(cpid)
if frontend.backend.playback.current_cpid == cpid:
frontend.backend.playback.next()
return frontend.backend.current_playlist.remove(cpid=cpid) return frontend.backend.current_playlist.remove(cpid=cpid)
except LookupError: except LookupError:
raise MpdNoExistError(u'No such song', command=u'deleteid') raise MpdNoExistError(u'No such song', command=u'deleteid')