include a thumb_size string with each Resizer to run gmg reprocess thumbs
authorRodney Ewing <ewing.rj@gmail.com>
Wed, 14 Aug 2013 23:25:44 +0000 (16:25 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:22 +0000 (15:30 -0700)
mediagoblin/gmg_commands/reprocess.py
mediagoblin/media_types/ascii/processing.py
mediagoblin/media_types/audio/processing.py
mediagoblin/media_types/image/processing.py
mediagoblin/media_types/pdf/processing.py
mediagoblin/media_types/stl/processing.py
mediagoblin/media_types/video/processing.py

index 375d9ff2be9f31889f7f933eb281c62ec6dafe1a..e2f19ea3f99da81aa78575f9b905689d59f44cf0 100644 (file)
@@ -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'
 
index 6ba432e21b85721b8e0cb54ba9021df8bed01889..ab89f4ad3814e8cfc3e0e7c041c4ae2dd1016d33 100644 (file)
@@ -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):
index 0bcac52cf6eb3178640a7b9e54eeda28c1eb0e21..77647d1224c5a00fb6df8c7988051713af7268c4 100644 (file)
@@ -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):
index c29030c9c854f3860890776353b2e33f517f0f84..81b4d449fb48a850845a47959c6f7482a32806d3 100644 (file)
@@ -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):
index fdf4b161ffc74ab545199f41294b95ceda27230b..22bbf01a5137a50d88ea8b1cd92cf40ad2be6ac4 100644 (file)
@@ -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):
index fc8c10b60c97563499926655be92e6b5af59a929..fddb94a2330803af93d4930b1eaf0a8aab0c4761 100644 (file)
@@ -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):
index ab78e8edaaf72537118de815301ab2ec61ac4a03..fefbebfef9adf0409450b834628a0173c4627837 100644 (file)
@@ -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):