Example #1
0
    def refreshShow(self, show, force=False):
        if (self.isBeingRefreshed(show) or self.isInRefreshQueue(show)) and not force:
            raise CantRefreshShowException(
                "This show is already being refreshed or queued to be refreshed, skipping this request.")
        elif (self.isBeingUpdated(show) or self.isInUpdateQueue(show)) and not force:
            raise CantRefreshShowException(
                "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.")

        sickrage.srCore.srLogger.debug("Queueing show refresh for {}".format(show.name))

        return self.put(QueueItemRefresh(show, force=force))
Example #2
0
    def refreshShow(self, show, force=False):
        if (self.is_being_refreshed(show)
                or self.is_in_refresh_queue(show)) and not force:
            raise CantRefreshShowException(
                "This show is already being refreshed or queued to be refreshed, skipping "
                "this request.")

        if show.paused and not force:
            sickrage.app.log.debug(
                'Skipping show [{}] because it is paused.'.format(show.name))
            return

        sickrage.app.log.debug("Queueing show refresh for {}".format(
            show.name))

        return self.put(QueueItemRefresh(show, force=force))
Example #3
0
    def refresh_show(self, indexer_id, force=False):
        show_obj = find_show(indexer_id)

        if (self.is_being_refreshed(indexer_id)
                or self.is_being_refreshed(indexer_id)) and not force:
            raise CantRefreshShowException(
                "This show is already being refreshed or queued to be refreshed, skipping this request."
            )

        if show_obj.paused and not force:
            sickrage.app.log.debug(
                'Skipping show [{}] because it is paused.'.format(
                    show_obj.name))
            return

        sickrage.app.log.debug("Queueing show refresh for {}".format(
            show_obj.name))

        self.put(ShowTaskRefresh(indexer_id, force=force))
Example #4
0
    def refreshShow(self, show, force=False):

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

        if (self.isBeingUpdated(show)
                or self.isInUpdateQueue(show)) and not force:
            sickrage.LOGGER.debug(
                "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."
            )
            return

        queueItemObj = QueueItemRefresh(show, force=force)

        sickrage.LOGGER.debug("Queueing show refresh for " + show.name)

        self.add_item(queueItemObj)

        return queueItemObj