Render webm_480 as default if webm_video is absent
Currently, webm_video is still the higher priority in media_fetch_oder as older versions should not be broken. So, webm_480p (main_task) will be rendered by default for newer versions. All tests pass at this point.
This commit is contained in:
parent
52814967cd
commit
336508bb17
@ -31,7 +31,7 @@ class VideoMediaManager(MediaManagerBase):
|
||||
type_icon = "images/type_icons/video.png"
|
||||
|
||||
# Used by the media_entry.get_display_media method
|
||||
media_fetch_order = [u'webm_video', u'original']
|
||||
media_fetch_order = [u'webm_video', u'webm_480p', u'original']
|
||||
default_webm_type = 'video/webm; codecs="vp8, vorbis"'
|
||||
|
||||
|
||||
|
@ -166,6 +166,7 @@ def store_metadata(media_entry, metadata):
|
||||
|
||||
@celery.task()
|
||||
def main_task(entry_id, resolution, medium_size, **process_info):
|
||||
print "\nEntry processing\n"
|
||||
entry, manager = get_entry_and_processing_manager(entry_id)
|
||||
print "\nEntered main_task\n"
|
||||
with CommonVideoProcessor(manager, entry) as processor:
|
||||
@ -175,6 +176,10 @@ def main_task(entry_id, resolution, medium_size, **process_info):
|
||||
processor.generate_thumb(thumb_size=process_info['thumb_size'])
|
||||
processor.store_orig_metadata()
|
||||
print "\nExited main_task\n"
|
||||
# Make state of entry as processed
|
||||
entry.state = u'processed'
|
||||
entry.save()
|
||||
print "\nEntry processed\n"
|
||||
|
||||
|
||||
@celery.task()
|
||||
@ -544,6 +549,9 @@ class VideoProcessingManager(ProcessingManager):
|
||||
|
||||
def workflow(self, entry, feed_url, reprocess_action, reprocess_info=None):
|
||||
|
||||
entry.state = u'processing'
|
||||
entry.save()
|
||||
|
||||
reprocess_info = reprocess_info or {}
|
||||
if 'vp8_quality' not in reprocess_info:
|
||||
reprocess_info['vp8_quality'] = None
|
||||
|
@ -66,13 +66,12 @@ def user_home(request, page):
|
||||
{'user': user})
|
||||
|
||||
cursor = MediaEntry.query.\
|
||||
filter_by(actor = user.id,
|
||||
state = u'processed').order_by(MediaEntry.created.desc())
|
||||
filter_by(actor = user.id).order_by(MediaEntry.created.desc())
|
||||
|
||||
pagination = Pagination(page, cursor)
|
||||
media_entries = pagination()
|
||||
|
||||
#if no data is available, return NotFound
|
||||
# if no data is available, return NotFound
|
||||
if media_entries == None:
|
||||
return render_404(request)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user