def delete(self, confirmed): if not confirmed: return try: self["list"].removeService(self.service) Trashcan.delete(self.service.getPath()) except Exception, e: print e self.session.open(MessageBox, _("Delete failed!"), MessageBox.TYPE_ERROR) return
def delete(self, confirmed): if not confirmed: return try: self["list"].removeService(self.service) Trashcan.delete(self.service.getPath()) except Exception as e: print(str(e)) self.session.open(MessageBox, _("Delete failed!"), MessageBox.TYPE_ERROR) return self.delayTimer.start(0, 1)
def delete(self, service): from Source.Trashcan import Trashcan if config.AdvancedMovieSelection.use_wastebasket.value: Trashcan.trash(service.getPath()) else: Trashcan.delete(service.getPath())