From 2689646f54da3a08b38d939d88687c93720321d1 Mon Sep 17 00:00:00 2001 From: herby2212 <12448284+herby2212@users.noreply.github.com> Date: Sun, 29 Oct 2023 19:21:36 +0100 Subject: [PATCH] fix cell formatting and concat of rating_key and section_id --- data/interfaces/default/js/tables/media_info_table.js | 2 +- plexpy/libraries.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/data/interfaces/default/js/tables/media_info_table.js b/data/interfaces/default/js/tables/media_info_table.js index cf020c2f..c27eadb3 100644 --- a/data/interfaces/default/js/tables/media_info_table.js +++ b/data/interfaces/default/js/tables/media_info_table.js @@ -226,7 +226,7 @@ media_info_table_options = { "targets": [10], "data": "duration", "createdCell": function (td, cellData, rowData, row, col) { - if (cellData !== null && cellData !== '') { + if (cellData !== null && cellData !== '' && cellData !== 0) { $(td).html(humanDuration(cellData)); } else { if (rowData['section_type'] != 'photo' && get_file_sizes != null) { diff --git a/plexpy/libraries.py b/plexpy/libraries.py index 67808a37..89e21898 100644 --- a/plexpy/libraries.py +++ b/plexpy/libraries.py @@ -763,6 +763,9 @@ class Libraries(object): rows = [] library_count = 0 + section_id = str(section_id) if section_id else section_id + rating_key = str(rating_key) if rating_key else rating_key + # Import data cache from json file try: inFilePath = os.path.join(plexpy.CONFIG.CACHE_DIR, (path + '_%s%s' % (section_id, ('-' + rating_key) if rating_key else ''))) @@ -788,6 +791,9 @@ class Libraries(object): if rows is None: rows = [] + section_id = str(section_id) if section_id else section_id + rating_key = str(rating_key) if rating_key else rating_key + try: outFilePath = os.path.join(plexpy.CONFIG.CACHE_DIR, (path + '_%s%s' % (section_id, ('-' + rating_key) if rating_key else ''))) with open(outFilePath, 'w') as outFile: