def updateShow(self, show, force=False): if self.isBeingAdded(show): raise exceptions.CantUpdateException( str(show.name) + u" is still being added, wait until it is finished before you update." ) if self.isBeingUpdated(show): raise exceptions.CantUpdateException( str(show.name) + u" is already being updated by Post-processor or manually started, can't update again until it's done." ) if self.isInUpdateQueue(show): raise exceptions.CantUpdateException( str(show.name) + u" is in process of being updated by Post-processor or manually started, can't update again until it's done." ) if not force: queueItemObj = QueueItemUpdate(show) else: queueItemObj = QueueItemForceUpdate(show) self.add_item(queueItemObj) return queueItemObj
def updateShow(self, show, force=False): if self.isBeingAdded(show): raise exceptions.CantUpdateException( "Show is still being added, wait until it is finished before you update." ) if self.isBeingUpdated(show): raise exceptions.CantUpdateException( "This show is already being updated, can't update again until it's done." ) if self.isInUpdateQueue(show): raise exceptions.CantUpdateException( "This show is already being updated, can't update again until it's done." ) if not force: queueItemObj = QueueItemUpdate(show) else: queueItemObj = QueueItemForceUpdate(show) self.add_item(queueItemObj) return queueItemObj
def updateShow(self, show, force=False, web=False, scheduled_update=False): if self.isBeingAdded(show): raise exceptions.CantUpdateException( 'Show is still being added, wait until it is finished before you update.' ) if self.isBeingUpdated(show): raise exceptions.CantUpdateException( 'This show is already being updated, can\'t update again until it\'s done.' ) if self.isInUpdateQueue(show): raise exceptions.CantUpdateException( 'This show is already being updated, can\'t update again until it\'s done.' ) if not force: queueItemObj = QueueItemUpdate(show, scheduled_update=scheduled_update) elif web: queueItemObj = QueueItemForceUpdateWeb( show, scheduled_update=scheduled_update) else: queueItemObj = QueueItemForceUpdate( show, scheduled_update=scheduled_update) self.add_item(queueItemObj) return queueItemObj