Merge pull request #199 from dettwild/develop
apply limit to OnDeck if OnDeckTVextended not set
This commit is contained in:
commit
fb452329cc
1 changed files with 4 additions and 0 deletions
|
@ -754,6 +754,7 @@ def getOnDeck(viewid, mediatype, tagname, limit):
|
||||||
if xml in (None, 401):
|
if xml in (None, 401):
|
||||||
log.error('Could not download PMS xml for view %s' % viewid)
|
log.error('Could not download PMS xml for view %s' % viewid)
|
||||||
return xbmcplugin.endOfDirectory(HANDLE)
|
return xbmcplugin.endOfDirectory(HANDLE)
|
||||||
|
limitcounter = 0
|
||||||
for item in xml:
|
for item in xml:
|
||||||
api = API(item)
|
api = API(item)
|
||||||
listitem = api.CreateListItemFromPlexItem(
|
listitem = api.CreateListItemFromPlexItem(
|
||||||
|
@ -775,6 +776,9 @@ def getOnDeck(viewid, mediatype, tagname, limit):
|
||||||
handle=HANDLE,
|
handle=HANDLE,
|
||||||
url=url,
|
url=url,
|
||||||
listitem=listitem)
|
listitem=listitem)
|
||||||
|
limitcounter += 1
|
||||||
|
if limitcounter == limit:
|
||||||
|
break
|
||||||
return xbmcplugin.endOfDirectory(
|
return xbmcplugin.endOfDirectory(
|
||||||
handle=HANDLE,
|
handle=HANDLE,
|
||||||
cacheToDisc=settings('enableTextureCache') == 'true')
|
cacheToDisc=settings('enableTextureCache') == 'true')
|
||||||
|
|
Loading…
Reference in a new issue