Skip to content

Commit

Permalink
Version bump 0.1.2 (#128)
Browse files Browse the repository at this point in the history
Fix issue causing no hubs to display with newer server versions
  • Loading branch information
ruuk authored Sep 27, 2017
1 parent 6b345cd commit 724ff53
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.plex"
name="Plex"
version="0.1.1"
version="0.1.2"
provider-name="Plex">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[- 0.1.2 -]

Fix issue with hubs not showing with (newer?) server versions

[- 0.1.1 -]

Remove PlexPass disclaimer from add-on info
Expand Down
22 changes: 14 additions & 8 deletions lib/windows/home.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import time
import threading
import re

import xbmc
import xbmcgui
Expand Down Expand Up @@ -725,22 +726,26 @@ def _showHubs(self, section=None, update=False):
hasContent = False
skip = {}
for hub in hubs:
if hub.hubIdentifier not in self.HUBMAP:
identifier = re.sub('\.\d+$', '', hub.hubIdentifier)
if identifier not in self.HUBMAP:
util.DEBUG_LOG('UNHANDLED - Hub: {0} ({1})'.format(hub.hubIdentifier, len(hub.items)))
continue

skip[self.HUBMAP[hub.hubIdentifier]['index']] = 1
skip[self.HUBMAP[identifier]['index']] = 1

if self.showHub(hub):
if hub.items:
hasContent = True
if self.HUBMAP[hub.hubIdentifier].get('do_updates'):
self.updateHubs[hub.hubIdentifier] = hub
if self.HUBMAP[identifier].get('do_updates'):
self.updateHubs[identifier] = hub

if not hasContent:
self.setBoolProperty('no.content', True)

lastSkip = min(skip.keys())
lastSkip = 0
if skip:
lastSkip = min(skip.keys())

focus = None
if update:
for i, control in enumerate(self.hubControls):
Expand All @@ -757,9 +762,10 @@ def _showHubs(self, section=None, update=False):
self.showBusy(False)

def showHub(self, hub, items=None):
if hub.hubIdentifier in self.HUBMAP:
util.DEBUG_LOG('Hub: {0} ({1})'.format(hub.hubIdentifier, len(hub.items)))
self._showHub(hub, hubitems=items, **self.HUBMAP[hub.hubIdentifier])
identifier = re.sub('\.\d+$', '', hub.hubIdentifier)
if identifier in self.HUBMAP:
util.DEBUG_LOG('Hub: {0} ({1})'.format(identifier, len(hub.items)))
self._showHub(hub, hubitems=items, **self.HUBMAP[identifier])
return True
else:
util.DEBUG_LOG('UNHANDLED - Hub: {0} ({1})'.format(hub.hubIdentifier, len(hub.items)))
Expand Down

0 comments on commit 724ff53

Please sign in to comment.