implement UTF-8 text/plain subtitles. change subtitle switching using second input...
[enigma2.git] / lib / python / Screens / Subtitles.py
index 31733d8..e637861 100644 (file)
@@ -56,13 +56,14 @@ class Subtitles(Screen, ConfigListScreen):
                                        else:
                                                self.list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+x[4], ConfigNothing(), x))
                        elif x[0] == 2:
+                               types = [" UTF-8 text "," SSA / AAS "," .SRT file "]
                                if x[4] == 'und': #undefined
-                                       self.list.append(getConfigListEntry(text+" subtitle stream %d " % x[1], ConfigNothing(), x))
+                                       self.list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d" % x[1], ConfigNothing(), x))
                                else:
                                        if LanguageCodes.has_key(x[4]):
-                                               self.list.append(getConfigListEntry(text+" subtitle stream %d " % x[1] +LanguageCodes[x[4]][0], ConfigNothing(), x))
+                                               self.list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles") + ' ' + LanguageCodes[x[4]][0], ConfigNothing(), x))
                                        else:
-                                               self.list.append(getConfigListEntry(text+" subtitle stream %d " % x[1] +x[4], ConfigNothing(), x))
+                                               self.list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d " % x[1] +x[4], ConfigNothing(), x))
 #              return _("Disable subtitles")
                self["config"].list = self.list
                self["config"].l.setList(self.list)