From 50753db4ff675f2fd9762856aeab2d06408535af Mon Sep 17 00:00:00 2001 From: mttlmy Date: Mon, 7 Aug 2017 19:27:46 -0400 Subject: [PATCH 1/4] Added platform 'Linux' to link to image linux.png --- data/interfaces/default/js/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/interfaces/default/js/script.js b/data/interfaces/default/js/script.js index 71e599fb..9f963710 100644 --- a/data/interfaces/default/js/script.js +++ b/data/interfaces/default/js/script.js @@ -258,6 +258,8 @@ function getPlatformImagePath(platformName) { return 'images/platforms/pmp.png'; } else if (platformName.indexOf("PlexTogether") > -1) { return 'images/platforms/plextogether.png'; + } else if (platformName.indexOf("Linux") > -1) { + return 'images/platforms/linux.png'; } else { return 'images/platforms/default.png'; } @@ -467,4 +469,4 @@ function humanFileSize(bytes, si) { ++u; } while (Math.abs(bytes) >= thresh && u < units.length - 1); return bytes.toFixed(1) + ' ' + units[u]; -} \ No newline at end of file +} From 1f7e8b4d9a68aa410e1c90aab517c22afeec27f5 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 19 Aug 2017 20:29:49 -0700 Subject: [PATCH 2/4] Fix removing old config backups --- plexpy/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/config.py b/plexpy/config.py index fb8ca8ac..052eb879 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -17,6 +17,7 @@ import arrow import os import re import shutil +import time from configobj import ConfigObj @@ -610,7 +611,7 @@ def make_backup(cleanup=False, scheduler=False): if cleanup: now = time.time() - # Delete all scheduled backup files except from the last 5. + # Delete all scheduled backup older than BACKUP_DAYS. for root, dirs, files in os.walk(backup_folder): ini_files = [os.path.join(root, f) for f in files if f.endswith('.sched.ini')] for file_ in ini_files: From be9a1dcf0687b26621a0e39a4bd1df534734de71 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 19 Aug 2017 20:48:01 -0700 Subject: [PATCH 3/4] Temporary fix for incorrect source media info --- plexpy/activity_processor.py | 10 +++++----- plexpy/pmsconnect.py | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plexpy/activity_processor.py b/plexpy/activity_processor.py index 79ab36af..9605f796 100644 --- a/plexpy/activity_processor.py +++ b/plexpy/activity_processor.py @@ -220,7 +220,7 @@ class ActivityProcessor(object): if not is_import: logger.debug(u"PlexPy ActivityProcessor :: Fetching metadata for item ratingKey %s" % session['rating_key']) pms_connect = pmsconnect.PmsConnect() - result = pms_connect.get_metadata_details(rating_key=str(session['rating_key'])) + result = pms_connect.get_metadata_details(rating_key=str(session['rating_key']), get_media_info=True) if result and result['metadata']: metadata = result['metadata'] else: @@ -293,10 +293,10 @@ class ActivityProcessor(object): '(last_insert_rowid(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' args = [session['rating_key'], session['video_decision'], session['audio_decision'], - session['duration'], session['width'], session['height'], session['container'], - session['video_codec'], session['audio_codec'], session['bitrate'], - session['video_resolution'], session['video_framerate'], session['aspect_ratio'], - session['audio_channels'], session['transcode_protocol'], session['transcode_container'], + metadata['duration'], metadata['width'], metadata['height'], metadata['container'], + metadata['video_codec'], metadata['audio_codec'], metadata['bitrate'], + metadata['video_resolution'], metadata['video_framerate'], metadata['aspect_ratio'], + metadata['audio_channels'], session['transcode_protocol'], session['transcode_container'], session['transcode_video_codec'], session['transcode_audio_codec'], session['transcode_audio_channels'], session['transcode_width'], session['transcode_height'], session['transcode_decision']] diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 71d06ac9..3201c637 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -881,6 +881,9 @@ class PmsConnect(object): 'video_framerate': helpers.get_xml_attr(media, 'videoFrameRate'), 'audio_codec': helpers.get_xml_attr(media, 'audioCodec'), 'audio_channels': helpers.get_xml_attr(media, 'audioChannels'), + 'aspect_ratio': helpers.get_xml_attr(media, 'aspectRatio'), + 'width': helpers.get_xml_attr(media, 'width'), + 'height': helpers.get_xml_attr(media, 'height'), 'file': helpers.get_xml_attr(media.getElementsByTagName('Part')[0], 'file'), 'file_size': helpers.get_xml_attr(media.getElementsByTagName('Part')[0], 'size'), } From ec685407bbd4924b7c94c2dab2f1754089e77322 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 19 Aug 2017 20:50:28 -0700 Subject: [PATCH 4/4] v1.4.22 --- CHANGELOG.md | 6 ++++++ plexpy/version.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index baffea0b..fd6c3d83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v1.4.22 (2017-08-19) + +* Fix: Cleaning up of old config backups. +* Fix: Temporary fix for incorrect source media info. + + ## v1.4.21 (2017-07-01) * New: Updated donation methods. diff --git a/plexpy/version.py b/plexpy/version.py index 6444909f..226e08af 100644 --- a/plexpy/version.py +++ b/plexpy/version.py @@ -1,2 +1,2 @@ PLEXPY_VERSION = "master" -PLEXPY_RELEASE_VERSION = "1.4.21" +PLEXPY_RELEASE_VERSION = "1.4.22"