예제 #1
0
    def on_task_output(self, task, config):
        """Task handler for archive_extract"""
        if isinstance(config, bool) and not config:
            return

        config = self.prepare_config(config)
        archiveutil.rarfile_set_tool_path(config)

        archiveutil.rarfile_set_path_sep(os.path.sep)

        for entry in task.accepted:
            self.handle_entry(entry, config)
예제 #2
0
    def on_task_output(self, task, config):
        """Task handler for archive_extract"""
        if isinstance(config, bool) and not config:
            return

        config = self.prepare_config(config)
        archiveutil.rarfile_set_tool_path(config)

        archiveutil.rarfile_set_path_sep(os.path.sep)

        for entry in task.accepted:
            self.handle_entry(entry, config)
예제 #3
0
    def on_task_filter(self, task, config):
        """
        Task handler for archives
        """
        if isinstance(config, bool) and not config:
            return

        config = self.prepare_config(config)
        utils.rarfile_set_tool_path(config)

        for entry in task.entries:
            archive_path = entry.get('location', '')
            entry.accept() if utils.is_archive(
                str(archive_path)) else entry.reject()
예제 #4
0
파일: archives.py 프로젝트: Flexget/Flexget
    def on_task_filter(self, task, config):
        """
        Task handler for archives
        """
        if isinstance(config, bool) and not config:
            return

        config = self.prepare_config(config)
        utils.rarfile_set_tool_path(config)

        for entry in task.entries:
            archive_path = entry.get('location', '')

            if utils.is_archive(archive_path):
                entry.accept()
            else:
                entry.reject()