From 6103d14a6fbc6ab9b1ae2bbce3a98c8372ee7443 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 29 Sep 2015 22:27:39 +0200 Subject: [PATCH 1/2] Fix for null paused_counter issue. --- plexpy/activity_processor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plexpy/activity_processor.py b/plexpy/activity_processor.py index 053f2018..95b43fe1 100644 --- a/plexpy/activity_processor.py +++ b/plexpy/activity_processor.py @@ -354,7 +354,10 @@ class ActivityProcessor(object): for session in result: if session['last_paused']: paused_offset = int(time.time()) - int(session['last_paused']) - paused_counter = int(session['paused_counter']) + int(paused_offset) + if session['paused_counter']: + paused_counter = int(session['paused_counter']) + int(paused_offset) + else: + paused_counter = int(paused_offset) values = {'state': 'playing', 'last_paused': timestamp From 234603387172917dbcd284c2054a690c90b8e6fa Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 29 Sep 2015 22:31:17 +0200 Subject: [PATCH 2/2] v1.2.1 --- CHANGELOG.md | 5 +++++ plexpy/version.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c1e0e5..5ad120f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v1.2.1 (2015-09-29) + +* Fix for possible issue when paused_counter is null. + + ## v1.2.0 (2015-09-29) * Added option to group consecutive plays in the history tables. diff --git a/plexpy/version.py b/plexpy/version.py index e4a761fa..b1677d0d 100644 --- a/plexpy/version.py +++ b/plexpy/version.py @@ -1,2 +1,2 @@ PLEXPY_VERSION = "master" -PLEXPY_RELEASE_VERSION = "1.2.0" +PLEXPY_RELEASE_VERSION = "1.2.1"