diff options
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/DiskInfo.py | 5 | ||||
| -rw-r--r-- | lib/python/Components/MovieList.py | 15 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/python/Components/DiskInfo.py b/lib/python/Components/DiskInfo.py index 68674e99..9490a0f8 100644 --- a/lib/python/Components/DiskInfo.py +++ b/lib/python/Components/DiskInfo.py @@ -11,12 +11,13 @@ class DiskInfo(GUIComponent, VariableText): USED = 1 SIZE = 2 - def __init__(self, path, type): + def __init__(self, path, type, update = True): GUIComponent.__init__(self) VariableText.__init__(self) self.type = type self.path = path - self.update() + if update: + self.update() def update(self): try: diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py index 7ec8a9ff..b31f7ff5 100644 --- a/lib/python/Components/MovieList.py +++ b/lib/python/Components/MovieList.py @@ -59,8 +59,8 @@ class MovieList(HTMLComponent, GUIComponent): def __init__(self, root): GUIComponent.__init__(self) self.l = eListboxPythonMultiContent() - self.load(root) - self.l.setList(self.list) + if root is not None: + self.reload(root) self.l.setFont(0, gFont("Regular", 30)) self.l.setFont(1, gFont("Regular", 18)) @@ -82,6 +82,13 @@ class MovieList(HTMLComponent, GUIComponent): self.instance.setContent(None) self.instance = None + def reload(self, root = None): + if root is not None: + self.load(root) + else: + self.load(self.root) + self.l.setList(self.list) + def load(self, root): # this lists our root service, then building a # nice list @@ -116,9 +123,5 @@ class MovieList(HTMLComponent, GUIComponent): count += 1 self.instance.moveSelectionTo(found) - def reload(self): - self.load(self.root) - self.l.setList(self.list) - def moveDown(self): self.instance.moveSelection(self.instance.moveDown) |
