From 872ef2771e8e34ffdf45783d3fcd8d948fa4ef5a Mon Sep 17 00:00:00 2001 From: Jonathan Wong Date: Sun, 25 Oct 2015 22:00:51 -0700 Subject: [PATCH] Fix double recently added episode notifications --- plexpy/activity_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/activity_handler.py b/plexpy/activity_handler.py index e9536451..e149ab40 100644 --- a/plexpy/activity_handler.py +++ b/plexpy/activity_handler.py @@ -256,9 +256,10 @@ class TimelineHandler(object): this_state = self.timeline['state'] this_type = self.timeline['type'] this_metadataState = self.timeline.get('metadataState', None) + this_mediaState = self.timeline.get('mediaState', None) # state: 5: done processing metadata # type: 1: movie, 2: tv show, 4: episode, 8: artist, 10: track types = [1, 2, 4, 8, 10] - if this_state == 5 and this_type in types and not this_metadataState: + if this_state == 5 and this_type in types and this_metadataState == None and this_mediaState == None: self.on_created() \ No newline at end of file