git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix newline
[enigma2.git]
/
lib
/
python
/
Components
/
MovieList.py
diff --git
a/lib/python/Components/MovieList.py
b/lib/python/Components/MovieList.py
index 25c32b663c4c5e4b7360f76659865aad358ea4af..666067fc3fb4e8121112b573618eaa269dae5b47 100644
(file)
--- a/
lib/python/Components/MovieList.py
+++ b/
lib/python/Components/MovieList.py
@@
-25,14
+25,17
@@
RT_WRAP = 32
# | name of movie |
#
def MovieListEntry(serviceref, serviceHandler):
# | name of movie |
#
def MovieListEntry(serviceref, serviceHandler):
+ if serviceref.flags & eServiceReference.mustDescent:
+ return None
+
info = serviceHandler.info(serviceref)
if info is None:
# ignore service which refuse to info
info = serviceHandler.info(serviceref)
if info is None:
# ignore service which refuse to info
- return
+ return
None
len = info.getLength(serviceref)
len = info.getLength(serviceref)
- if len:
+ if len
> 0
:
len = "%d:%02d" % (len / 60, len % 60)
else:
len = "?:??"
len = "%d:%02d" % (len / 60, len % 60)
else:
len = "?:??"
@@
-89,6
+92,12
@@
class MovieList(HTMLComponent, GUIComponent):
self.load(self.root)
self.l.setList(self.list)
self.load(self.root)
self.l.setList(self.list)
+ def removeService(self, service):
+ for l in self.list[:]:
+ if l[0][0] == service:
+ self.list.remove(l)
+ self.l.setList(self.list)
+
def load(self, root):
# this lists our root service, then building a
# nice list
def load(self, root):
# this lists our root service, then building a
# nice list
@@
-112,7
+121,9
@@
class MovieList(HTMLComponent, GUIComponent):
# now process them...
for ref in movieList:
# now process them...
for ref in movieList:
- self.list.append(MovieListEntry(ref, serviceHandler))
+ a = MovieListEntry(ref, serviceHandler)
+ if a is not None:
+ self.list.append(a)
self.list.sort(key=lambda x: -x[0][1])
self.list.sort(key=lambda x: -x[0][1])