From 3225008f04e263c618186da881e3e01439578900 Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Wed, 14 Aug 2013 16:25:44 -0700 Subject: [PATCH] include a thumb_size string with each Resizer to run gmg reprocess thumbs --- mediagoblin/gmg_commands/reprocess.py | 6 ++++-- mediagoblin/media_types/ascii/processing.py | 1 + mediagoblin/media_types/audio/processing.py | 1 + mediagoblin/media_types/image/processing.py | 1 + mediagoblin/media_types/pdf/processing.py | 1 + mediagoblin/media_types/stl/processing.py | 1 + mediagoblin/media_types/video/processing.py | 1 + 7 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mediagoblin/gmg_commands/reprocess.py b/mediagoblin/gmg_commands/reprocess.py index 375d9ff2..e2f19ea3 100644 --- a/mediagoblin/gmg_commands/reprocess.py +++ b/mediagoblin/gmg_commands/reprocess.py @@ -245,8 +245,10 @@ def thumbs(args): # prepare filetype and size to be passed into reprocess_parser if args.size: - extra_args = 'thumb --size {0} {1}'.format(args.size[0], - args.size[1]) + extra_args = 'thumb --{0} {1} {2}'.format( + processor_class.thumb_size, + args.size[0], + args.size[1]) else: extra_args = 'thumb' diff --git a/mediagoblin/media_types/ascii/processing.py b/mediagoblin/media_types/ascii/processing.py index 6ba432e2..ab89f4ad 100644 --- a/mediagoblin/media_types/ascii/processing.py +++ b/mediagoblin/media_types/ascii/processing.py @@ -198,6 +198,7 @@ class Resizer(CommonAsciiProcessor): """ name = 'resize' description = 'Resize thumbnail' + thumb_size = 'thumb_size' @classmethod def media_is_eligible(cls, entry=None, state=None): diff --git a/mediagoblin/media_types/audio/processing.py b/mediagoblin/media_types/audio/processing.py index 0bcac52c..77647d12 100644 --- a/mediagoblin/media_types/audio/processing.py +++ b/mediagoblin/media_types/audio/processing.py @@ -232,6 +232,7 @@ class Resizer(CommonAudioProcessor): """ name = 'resize' description = 'Resize thumbnail or spectogram' + thumb_size = 'thumb_size' @classmethod def media_is_eligible(cls, entry=None, state=None): diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py index c29030c9..81b4d449 100644 --- a/mediagoblin/media_types/image/processing.py +++ b/mediagoblin/media_types/image/processing.py @@ -267,6 +267,7 @@ class Resizer(CommonImageProcessor): """ name = 'resize' description = 'Resize image' + thumb_size = 'size' @classmethod def media_is_eligible(cls, entry=None, state=None): diff --git a/mediagoblin/media_types/pdf/processing.py b/mediagoblin/media_types/pdf/processing.py index fdf4b161..22bbf01a 100644 --- a/mediagoblin/media_types/pdf/processing.py +++ b/mediagoblin/media_types/pdf/processing.py @@ -389,6 +389,7 @@ class Resizer(CommonPdfProcessor): """ name = 'resize' description = 'Resize thumbnail and medium' + thumb_size = 'size' @classmethod def media_is_eligible(cls, entry=None, state=None): diff --git a/mediagoblin/media_types/stl/processing.py b/mediagoblin/media_types/stl/processing.py index fc8c10b6..fddb94a2 100644 --- a/mediagoblin/media_types/stl/processing.py +++ b/mediagoblin/media_types/stl/processing.py @@ -279,6 +279,7 @@ class Resizer(CommonStlProcessor): """ name = 'resize' description = 'Resize thumbnail and mediums' + thumb_size = 'size' @classmethod def media_is_eligible(cls, entry=None, state=None): diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py index ab78e8ed..fefbebfe 100644 --- a/mediagoblin/media_types/video/processing.py +++ b/mediagoblin/media_types/video/processing.py @@ -290,6 +290,7 @@ class Resizer(CommonVideoProcessor): """ name = 'resize' description = 'Resize thumbnail' + thumb_size = 'thumb_size' @classmethod def media_is_eligible(cls, entry=None, state=None): -- 2.25.1