def refreshShow(self, show, force=False):

        if self.isBeingRefreshed(show) and not force:
            raise exceptions.CantRefreshException(
                "This show is already being refreshed, not refreshing again.")

        if (self.isBeingUpdated(show)
                or self.isInUpdateQueue(show)) and not force:
            logger.log(
                u"A refresh was attempted but there is already an update queued or in progress. Since updates do a refres at the end anyway I'm skipping this request.",
                logger.DEBUG)
            return

        queueItemObj = QueueItemRefresh(show)

        self.add_item(queueItemObj)

        return queueItemObj
Example #2
0
    def refreshShow(self, show, force=False, scheduled_update=False, after_update=False,
                    priority=generic_queue.QueuePriorities.HIGH, force_image_cache=False, **kwargs):

        if self.isBeingRefreshed(show) and not force:
            raise exceptions.CantRefreshException('This show is already being refreshed, not refreshing again.')

        if ((not after_update and self.isBeingUpdated(show)) or self.isInUpdateQueue(show)) and not force:
            logger.log(
                'Skipping this refresh as there is already an update queued or in progress and a refresh is done at the end of an update anyway.',
                logger.DEBUG)
            return

        queueItemObj = QueueItemRefresh(show, force=force, scheduled_update=scheduled_update, priority=priority,
                                        force_image_cache=force_image_cache, **kwargs)

        self.add_item(queueItemObj)

        return queueItemObj
Example #3
0
    def refreshShow(self,
                    show,
                    force=False,
                    scheduled_update=False,
                    after_update=False):

        if self.isBeingRefreshed(show) and not force:
            raise exceptions.CantRefreshException(
                'This show is already being refreshed, not refreshing again.')

        if ((not after_update and self.isBeingUpdated(show))
                or self.isInUpdateQueue(show)) and not force:
            logger.log(
                u'A refresh was attempted but there is already an update queued or in progress. Since updates do a refresh at the end anyway I\'m skipping this request.',
                logger.DEBUG)
            return

        queueItemObj = QueueItemRefresh(show,
                                        force=force,
                                        scheduled_update=scheduled_update)

        self.add_item(queueItemObj)

        return queueItemObj