+
+ if answer in ("quitanddelete", "quitanddeleteconfirmed"):
+ ref = self.session.nav.getCurrentlyPlayingServiceReference()
+ from enigma import eServiceCenter
+ serviceHandler = eServiceCenter.getInstance()
+ info = serviceHandler.info(ref)
+ name = info and info.getName(ref) or _("this recording")
+
+ if answer == "quitanddelete":
+ from Screens.MessageBox import MessageBox
+ self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Do you really want to delete %s?") % name)
+ return
+
+ elif answer == "quitanddeleteconfirmed":
+ offline = serviceHandler.offlineOperations(ref)
+ if offline.deleteFromDisk(0):
+ from Screens.MessageBox import MessageBox
+ self.session.openWithCallback(self.close, MessageBox, _("You cannot delete this!"), MessageBox.TYPE_ERROR)
+ return
+
+ if answer in ("quit", "quitanddeleteconfirmed"):