aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Subtitles.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-11-06 09:10:15 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-11-06 09:10:15 +0000
commit6ebe2f45ec609f3769a4a57e4bbbf776aa3cb930 (patch)
tree05df301d0b366035278d063d7e812ac9c6146dbf /lib/python/Screens/Subtitles.py
parentccee5d9ea44a69fad9851dd3f286f3f28b6078d7 (diff)
downloadenigma2-6ebe2f45ec609f3769a4a57e4bbbf776aa3cb930.tar.gz
enigma2-6ebe2f45ec609f3769a4a57e4bbbf776aa3cb930.zip
no bluescreen when language code not exist in ISO639.py
Diffstat (limited to 'lib/python/Screens/Subtitles.py')
-rw-r--r--lib/python/Screens/Subtitles.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/python/Screens/Subtitles.py b/lib/python/Screens/Subtitles.py
index 043198c8..ac2937ff 100644
--- a/lib/python/Screens/Subtitles.py
+++ b/lib/python/Screens/Subtitles.py
@@ -30,12 +30,18 @@ class Subtitles(Screen, ConfigListScreen):
else:
text = _("Enable")
if x[0] == 0:
- self.list.append(getConfigListEntry(text+" DVB "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+ if LanguageCodes.has_key(x[4]):
+ self.list.append(getConfigListEntry(text+" DVB "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+ else:
+ self.list.append(getConfigListEntry(text+" DVB "+x[4], ConfigNothing(), x))
elif x[0] == 1:
if x[4] == 'und': #undefined
self.list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2]), ConfigNothing(), x))
else:
- self.list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+ if LanguageCodes.has_key(x[4]):
+ self.list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+ else:
+ self.list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+x[4], ConfigNothing(), x))
# return _("Disable subtitles")
self["config"].list = self.list
self["config"].l.setList(self.list)