aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-12-13 12:05:33 +0100
committerghost <andreas.monzner@multimedia-labs.de>2010-12-13 12:16:56 +0100
commitf2381d07785eb22548298f3b3b268c986ab1c882 (patch)
tree0aa204b9c261d53342c72b9dfb0e8a93402c4ac3 /lib
parent706a18038f5da82d10529188e699e37bb4a9f76a (diff)
downloadenigma2-f2381d07785eb22548298f3b3b268c986ab1c882.tar.gz
enigma2-f2381d07785eb22548298f3b3b268c986ab1c882.zip
dont show unsupported subtitles in subtitle list (refs #537)
Diffstat (limited to 'lib')
-rw-r--r--lib/service/servicemp3.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index 04b1773f..dc84b428 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -1806,15 +1806,25 @@ PyObject *eServiceMP3::getSubtitleList()
for (std::vector<subtitleStream>::iterator IterSubtitleStream(m_subtitleStreams.begin()); IterSubtitleStream != m_subtitleStreams.end(); ++IterSubtitleStream)
{
subtype_t type = IterSubtitleStream->type;
- ePyObject tuple = PyTuple_New(5);
-// eDebug("eServiceMP3::getSubtitleList idx=%i type=%i, code=%s", stream_idx, int(type), (IterSubtitleStream->language_code).c_str());
- PyTuple_SET_ITEM(tuple, 0, PyInt_FromLong(2));
- PyTuple_SET_ITEM(tuple, 1, PyInt_FromLong(stream_idx));
- PyTuple_SET_ITEM(tuple, 2, PyInt_FromLong(int(type)));
- PyTuple_SET_ITEM(tuple, 3, PyInt_FromLong(0));
- PyTuple_SET_ITEM(tuple, 4, PyString_FromString((IterSubtitleStream->language_code).c_str()));
- PyList_Append(l, tuple);
- Py_DECREF(tuple);
+ switch(type)
+ {
+ case stUnknown:
+ case stVOB:
+ case stPGS:
+ break;
+ default:
+ {
+ ePyObject tuple = PyTuple_New(5);
+// eDebug("eServiceMP3::getSubtitleList idx=%i type=%i, code=%s", stream_idx, int(type), (IterSubtitleStream->language_code).c_str());
+ PyTuple_SET_ITEM(tuple, 0, PyInt_FromLong(2));
+ PyTuple_SET_ITEM(tuple, 1, PyInt_FromLong(stream_idx));
+ PyTuple_SET_ITEM(tuple, 2, PyInt_FromLong(int(type)));
+ PyTuple_SET_ITEM(tuple, 3, PyInt_FromLong(0));
+ PyTuple_SET_ITEM(tuple, 4, PyString_FromString((IterSubtitleStream->language_code).c_str()));
+ PyList_Append(l, tuple);
+ Py_DECREF(tuple);
+ }
+ }
stream_idx++;
}
eDebug("eServiceMP3::getSubtitleList finished");