diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 94521cca568..cb47bcbbb3b 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -194,7 +194,7 @@ def action(self, contexts, action): "prevBouquet": (self.prevBouquet, self.prevBouquetHelpText), "nextBouquet": (self.nextBouquet, self.nextBouquetHelptext), "delete": (self.deletePlaylistEntry, _("Delete playlist entry")), - "shift_stop": (self.clear_playlist, _("Clear playlist")), + "shift_stop": (self.confirm_clear_playlist, _("Clear playlist")), "shift_record": (self.playlist.PlayListShuffle, _("Shuffle playlist")), "subtitles": (self.subtitleSelection, _("Subtitle selection")), }, -2) @@ -765,6 +765,12 @@ def deleteConfirmed(self, confirmed): print("delete failed:", e) self.session.open(MessageBox, _("Delete failed!"), MessageBox.TYPE_ERROR) + def confirm_clear_playlist(self): + def confirm(answer=False): + if answer: + self.clear_playlist() + self.session.openWithCallback(confirm, MessageBox, _("Do you really want to clear this playlist?"), type=MessageBox.TYPE_YESNO, default=False) + def clear_playlist(self): self.isAudioCD = False self.stopEntry()