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/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 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"