from mediagoblin import mg_globals as mgg
from mediagoblin.processing import mark_entry_failed, \
- THUMB_SIZE, MEDIUM_SIZE, create_pub_filepath
+ THUMB_SIZE, MEDIUM_SIZE, create_pub_filepath, FilenameMunger
from . import transcoders
logging.basicConfig()
queued_filename = workbench.localized_file(
mgg.queue_store, queued_filepath,
'source')
+ name_munger = FilenameMunger(queued_filename)
medium_filepath = create_pub_filepath(
- entry,
- '{original}-640p.webm'.format(
- original=os.path.splitext(
- queued_filepath[-1])[0] # Select the
- ))
+ entry, name_munger.munge('{basename}-640p.webm'))
thumbnail_filepath = create_pub_filepath(
- entry, 'thumbnail.jpg')
-
+ entry, name_munger.munge('{basename}.thumbnail.jpg'))
# Create a temporary file for the video destination
tmp_dst = tempfile.NamedTemporaryFile()