summaryrefslogtreecommitdiff
path: root/podcast
diff options
context:
space:
mode:
authorNabil Hanna <ali@users.schwerkraft.elitedvb.net>2010-08-01 11:30:34 (GMT)
committerNabil Hanna <ali@users.schwerkraft.elitedvb.net>2010-08-01 11:30:34 (GMT)
commitf1c0d4ce4109c52ffeabed8d4720b33840bc1bb7 (patch)
tree68127114cafcb6bdfafd1ccb0b00356cd34811a3 /podcast
parent7eac04bb998ecd47988cd252c84ab764c1584a7e (diff)
do not crash when showing podcasts without 'length' information
Diffstat (limited to 'podcast')
-rw-r--r--podcast/src/plugin.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/podcast/src/plugin.py b/podcast/src/plugin.py
index 92ac4a7..d63cd69 100644
--- a/podcast/src/plugin.py
+++ b/podcast/src/plugin.py
@@ -308,14 +308,14 @@ class PodcastMovies(Screen):
else:
url = "N/A"
+ length = "N/A"
if info.__contains__('length="'):
idx = info.index('length="')
length = info[idx+8:]
idx = length.index('"')
- length = length[:idx]
- length = str((int(length) / 1024) / 1024) + " MB"
- else:
- length = "N/A"
+ length = length[:idx]
+ if length:
+ length = str((int(length) / 1024) / 1024) + " MB"
if info.__contains__('type="'):
idx = info.index('type="')