From b864cd3b4538a3c4e06792658af978235b0e9ea7 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 31 Dec 2016 15:16:31 -0800 Subject: [PATCH] case viewCount to int --- plexapi/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexapi/utils.py b/plexapi/utils.py index 000f27b7..3015d8eb 100644 --- a/plexapi/utils.py +++ b/plexapi/utils.py @@ -460,9 +460,9 @@ def listItems(server, path, libtype=None, watched=None, bytag=False): for elem in server.query(path): if libtype and elem.attrib.get('type') != libtype: continue - if watched is True and elem.attrib.get('viewCount', 0) == 0: + if watched is True and int(elem.attrib.get('viewCount', 0)) == 0: continue - if watched is False and elem.attrib.get('viewCount', 0) >= 1: + if watched is False and int(elem.attrib.get('viewCount', 0)) >= 1: continue try: items.append(buildItem(server, elem, path, bytag))