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"'
@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:
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()
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
{'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)