From 93509666d7d1148401554ba45c240dfc8d70b890 Mon Sep 17 00:00:00 2001 From: dettwild Date: Thu, 2 Feb 2017 20:31:58 +0100 Subject: [PATCH] apply limit to OnDeck if OnDeckTVextended not set --- resources/lib/entrypoint.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 06d2c46d..cd4f70dc 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -754,6 +754,7 @@ def getOnDeck(viewid, mediatype, tagname, limit): if xml in (None, 401): log.error('Could not download PMS xml for view %s' % viewid) return xbmcplugin.endOfDirectory(HANDLE) + limitcounter = 0 for item in xml: api = API(item) listitem = api.CreateListItemFromPlexItem( @@ -775,6 +776,9 @@ def getOnDeck(viewid, mediatype, tagname, limit): handle=HANDLE, url=url, listitem=listitem) + limitcounter += 1 + if limitcounter == limit: + break return xbmcplugin.endOfDirectory( handle=HANDLE, cacheToDisc=settings('enableTextureCache') == 'true')