Order shots by their cut-in timestamp.

This commit is contained in:
2016-09-27 15:56:08 +02:00
parent c9f2d24105
commit 0b723f3fc9

View File

@@ -42,7 +42,11 @@ def for_project(project, attract_props, task_id=None, shot_id=None):
'where': { 'where': {
'project': project['_id'], 'project': project['_id'],
'node_type': node_type_shot['name'], 'node_type': node_type_shot['name'],
}}, api=api) },
'sort': [
('properties.cut_in_timeline_in_frames', 1),
]
}, api=api)
shots = found['_items'] shots = found['_items']
tasks_for_shots = current_attract.shot_manager.tasks_for_shots( tasks_for_shots = current_attract.shot_manager.tasks_for_shots(
@@ -66,7 +70,6 @@ def for_project(project, attract_props, task_id=None, shot_id=None):
@perproject_blueprint.route('/<shot_id>') @perproject_blueprint.route('/<shot_id>')
@attract_project_view(extension_props=True) @attract_project_view(extension_props=True)
def view_shot(project, attract_props, shot_id): def view_shot(project, attract_props, shot_id):
if not request.is_xhr: if not request.is_xhr:
return for_project(project, attract_props, shot_id=shot_id) return for_project(project, attract_props, shot_id=shot_id)