Skip to content

Commit

Permalink
Merge pull request #4139 from ims21/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
littlesat authored Dec 18, 2024
2 parents ce5cb77 + 549b8e9 commit 07865a7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/python/Plugins/Extensions/MediaPlayer/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 07865a7

Please sign in to comment.