diff --git a/data/interfaces/default/library.html b/data/interfaces/default/library.html index 26153402..dd1bebb0 100644 --- a/data/interfaces/default/library.html +++ b/data/interfaces/default/library.html @@ -854,7 +854,7 @@ DOCUMENTATION :: END }; }, complete: function(xhr, status) { - $("#info-element-total-media-runtime").html(humanDuration(xhr.responseJSON.total_duration)); + $("#info-element-total-media-runtime").html(humanDuration(xhr.responseJSON.total_media_duration)); $("#info-element-total-file-size").html(humanFileSize(xhr.responseJSON.total_file_size)); } }; diff --git a/plexpy/libraries.py b/plexpy/libraries.py index e8c4b28d..19ab6ff4 100644 --- a/plexpy/libraries.py +++ b/plexpy/libraries.py @@ -631,7 +631,7 @@ class Libraries(object): results = sorted(results, key=lambda k: k[sort_key].lower(), reverse=reverse) total_file_size = sum([helpers.cast_to_int(d['file_size']) for d in results]) - total_duration = sum([helpers.cast_to_int(d['duration']) for d in results]) + total_media_duration = sum([helpers.cast_to_int(d['duration']) for d in results]) # Paginate results results = results[json_data['start']:(json_data['start'] + json_data['length'])] @@ -645,7 +645,7 @@ class Libraries(object): 'draw': int(json_data['draw']), 'filtered_file_size': filtered_file_size, 'total_file_size': total_file_size, - 'total_duration': total_duration, + 'total_media_duration': total_media_duration, 'last_refreshed': cache_time } diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 196bbe5b..12daa164 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -798,12 +798,14 @@ class WebInterface(object): "recordsFiltered": 82, "filtered_file_size": 2616760056742, "total_file_size": 2616760056742, + "total_media_duration": 7947375522, "data": [{"added_at": "1403553078", "audio_channels": "", "audio_codec": "", "bitrate": "", "container": "", + "duration": "", "file_size": 253660175293, "grandparent_rating_key": "", "last_played": 1462380698,