From 7bc94cd95d230d735c33bccbe469fa51fcd5e3a3 Mon Sep 17 00:00:00 2001 From: herby2212 <12448284+herby2212@users.noreply.github.com> Date: Sun, 29 Oct 2023 12:19:10 +0100 Subject: [PATCH] library_media_stats for libraries page --- .../interfaces/default/js/tables/libraries.js | 24 +++++++++++++++++++ data/interfaces/default/libraries.html | 2 ++ 2 files changed, 26 insertions(+) diff --git a/data/interfaces/default/js/tables/libraries.js b/data/interfaces/default/js/tables/libraries.js index b3e702a0..ee8aa488 100644 --- a/data/interfaces/default/js/tables/libraries.js +++ b/data/interfaces/default/js/tables/libraries.js @@ -202,6 +202,30 @@ libraries_list_table_options = { "searchable": false, "width": "10%", "className": "no-wrap" + }, + { + "targets": [11], + "data": "total_storage", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== null && cellData !== '') { + $(td).html(humanFileSize(cellData)); + } + }, + "searchable": false, + "width": "10%", + "className": "no-wrap" + }, + { + "targets": [12], + "data": "total_duration", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== null && cellData !== '') { + $(td).html(humanDuration(cellData)); + } + }, + "searchable": false, + "width": "10%", + "className": "no-wrap" } ], diff --git a/data/interfaces/default/libraries.html b/data/interfaces/default/libraries.html index 70468ff3..5ad1dc06 100644 --- a/data/interfaces/default/libraries.html +++ b/data/interfaces/default/libraries.html @@ -41,6 +41,8 @@