Merge pull request #87 from WyseNynja/master

cast viewCount to int
This commit is contained in:
Hellowlol 2017-01-02 22:31:16 +01:00 committed by GitHub
commit 9826cc1a4b

View file

@ -444,9 +444,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))