X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=31820541a7ad46a51a76b8a07bf2f412d3b39267;hb=d13e2f639316c1dba7a62d84f3c850bc937c2b1e;hp=c49b204f1c2e320036ab5cd19b4d2b330fec980c;hpb=1b0d4f5fef925f2f7811fd32be1c773ab813c49e;p=plomrogue2
diff --git a/plomrogue/things.py b/plomrogue/things.py
index c49b204..3182054 100644
--- a/plomrogue/things.py
+++ b/plomrogue/things.py
@@ -225,6 +225,14 @@ class Thing_MusicPlayer(Thing):
return ['playing']
else:
return ['paused']
+ elif command == 'REMOVE':
+ if len(self.playlist) == 0:
+ return ['playlist already empty']
+ del self.playlist[max(0, self.playlist_index)]
+ self.playlist_index -= 1
+ if self.playlist_index < -1:
+ self.playlist_index = -1
+ return ['removed song']
elif command == 'REWIND':
self.playlist_index = -1
self.next_song_start = datetime.datetime.now()