diff options
Diffstat (limited to 'mediagoblin/processing/__init__.py')
-rw-r--r-- | mediagoblin/processing/__init__.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mediagoblin/processing/__init__.py b/mediagoblin/processing/__init__.py index 29345227..2897b5e7 100644 --- a/mediagoblin/processing/__init__.py +++ b/mediagoblin/processing/__init__.py @@ -39,9 +39,14 @@ class ProgressCallback(object): def __init__(self, entry): self.entry = entry - def __call__(self, progress): + def __call__(self, progress, default_quality_progress=None): if progress: - self.entry.transcoding_progress = progress + if 100 - (self.entry.transcoding_progress + progress) < 0.01: + self.entry.transcoding_progress = 100 + else: + self.entry.transcoding_progress += round(progress, 2) + if default_quality_progress: + self.entry.main_transcoding_progress = default_quality_progress self.entry.save() @@ -257,6 +262,12 @@ class ProcessingManager(object): return processor + def workflow(self, entry, feed_url, reprocess_action, reprocess_info=None): + """ + Returns the Celery command needed to proceed with media processing + """ + return None + def request_from_args(args, which_args): """ |