Skip to content

Commit

Permalink
Merge pull request #3430 from learningequality/duration_patch
Browse files Browse the repository at this point in the history
Add support for file duration and node suggested duration for ricecooker
  • Loading branch information
bjester authored Aug 22, 2022
2 parents 5c686c9 + c256b32 commit e98c642
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions contentcuration/contentcuration/utils/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def map_files_to_node(user, node, data): # noqa: C901
preset=kind_preset,
language_id=file_data.get('language'),
uploaded_by=user,
duration=file_data.get("duration"),
)
resource_obj.file_on_disk.name = file_path
resource_obj.save()
Expand Down
1 change: 1 addition & 0 deletions contentcuration/contentcuration/views/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ def create_node(node_data, parent_node, sort_order): # noqa: C901
# later when we have all data available to determine if it is
# complete or not.
complete=True,
suggested_duration=node_data.get("suggested_duration"),
**metadata_labels
)

Expand Down

0 comments on commit e98c642

Please sign in to comment.