From aa5affe366d5bbeb6cf9eda41556d1c35acc6ef9 Mon Sep 17 00:00:00 2001 From: aaronldunlap Date: Thu, 23 Jan 2020 17:09:39 -0600 Subject: [PATCH 1/3] Change humanFileSize to default to SI notation --- plexpy/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/helpers.py b/plexpy/helpers.py index ae47f5cd..d6710c75 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -1006,7 +1006,7 @@ def build_datatables_json(kwargs, dt_columns, default_sort_col=None): return json.dumps(json_data) -def humanFileSize(bytes, si=False): +def humanFileSize(bytes, si=True): if str(bytes).isdigit(): bytes = int(bytes) else: From 04765288d75f3ec44ce8df8497913d4a67ef43e6 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 29 Mar 2020 10:27:56 -0700 Subject: [PATCH 2/3] Change default file size on media info tables to SI units --- data/interfaces/default/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/interfaces/default/js/script.js b/data/interfaces/default/js/script.js index 4954ebd6..089488c9 100644 --- a/data/interfaces/default/js/script.js +++ b/data/interfaces/default/js/script.js @@ -461,7 +461,7 @@ $('*').on('click', '.refresh_pms_image', function (e) { }); // Taken from http://stackoverflow.com/questions/10420352/converting-file-size-in-bytes-to-human-readable#answer-14919494 -function humanFileSize(bytes, si) { +function humanFileSize(bytes, si = true) { var thresh = si ? 1000 : 1024; if (Math.abs(bytes) < thresh) { return bytes + ' B'; From e4ec24be261c690015b9d70bcc88a89b8c3b2ea5 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 29 Mar 2020 10:28:42 -0700 Subject: [PATCH 3/3] Reorder git pull command for update --- plexpy/versioncheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/versioncheck.py b/plexpy/versioncheck.py index 17b39dc1..e0eef858 100644 --- a/plexpy/versioncheck.py +++ b/plexpy/versioncheck.py @@ -251,7 +251,7 @@ def update(): logger.info('Windows .exe updating not supported yet.') elif plexpy.INSTALL_TYPE == 'git': - output, err = runGit('pull {} {} --ff-only'.format(plexpy.CONFIG.GIT_REMOTE, + output, err = runGit('pull --ff-only {} {}'.format(plexpy.CONFIG.GIT_REMOTE, plexpy.CONFIG.GIT_BRANCH)) if not output: