Video Duration: The duration of a video is now shown on thumbnails and bellow the video player

Asset nodes now have a new field called "properties.duration_seconds". This holds a copy of the duration stored on the referenced video file and stays in sync using eve hooks.

To migrate existing duration times from files to nodes you need to run the following:
./manage.py maintenance reconcile_node_video_duration -ag

There are 2 more maintenance commands to be used to determine if there are any missing durations in either files or nodes:
find_video_files_without_duration
find_video_nodes_without_duration

FFProbe is now used to detect what duration a video file has.

Reviewed by Sybren.
This commit is contained in:
2018-10-03 18:30:40 +02:00
parent 2a8a109d83
commit c81711de53
3 changed files with 179 additions and 3 deletions

View File

@@ -91,8 +91,8 @@
}
}
if (node.video_duration){
let card_duration = $('<div class="card-label right">' + node.video_duration + '</div>');
if (node.properties.duration){
let card_duration = $('<div class="card-label right">' + node.properties.duration + '</div>');
thumbnail_container.append(card_duration);
}