From 51548f89cfb78ddf84941ddd5218a0dd16251fa9 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 15 May 2016 18:26:07 +0200 Subject: [PATCH] New setting: show watched movies in recently added --- resources/language/English/strings.xml | 1 + resources/language/German/strings.xml | 1 + resources/lib/entrypoint.py | 2 +- resources/lib/videonodes.py | 8 ++++++-- resources/settings.xml | 4 +++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 390a0a47..38255833 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -410,6 +410,7 @@ Force Transcode Hi10P Recently Added: Also show already watched episodes Force Transcode HEVC + Recently Added: Also show already watched movies (Refresh Plex playlist/nodes!) Log-out Plex Home User diff --git a/resources/language/German/strings.xml b/resources/language/German/strings.xml index 16499a00..12aaeb68 100644 --- a/resources/language/German/strings.xml +++ b/resources/language/German/strings.xml @@ -349,6 +349,7 @@ Hi10p Codec Transkodierung erzwingen "Zuletzt hinzugefügt": gesehene Folgen anzeigen HEVC Codec Transkodierung erzwingen + "Zuletzt hinzugefügt": gesehene Filme anzeigen (Plex Playlisten und Nodes zurücksetzen!) Plex Home Benutzer abmelden: diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 144b6d37..93ef51c7 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -1269,7 +1269,7 @@ def getRecentEpisodes(viewid, mediatype, tagname, limit): "limits": {"end": limit} } } - if utils.settings('ShowWatched') == 'false': + if utils.settings('TVShowWatched') == 'false': query['params']['filter'] = { 'operator': "lessthan", 'field': "playcount", diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index 24ef7be2..0a7eb237 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -300,8 +300,12 @@ class VideoNodes(object): elif nodetype == "recent": etree.SubElement(root, 'order', {'direction': "descending"}).text = "dateadded" etree.SubElement(root, 'limit').text = limit - rule = etree.SubElement(root, 'rule', {'field': "playcount", 'operator': "is"}) - etree.SubElement(rule, 'value').text = "0" + if utils.settings('MovieShowWatched') == 'false': + rule = etree.SubElement(root, + 'rule', + {'field': "playcount", + 'operator': "is"}) + etree.SubElement(rule, 'value').text = "0" elif nodetype == "inprogress": etree.SubElement(root, 'rule', {'field': "inprogress", 'operator': "true"}) diff --git a/resources/settings.xml b/resources/settings.xml index 4de1aa92..bddb070b 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -136,9 +136,11 @@ - + + +