X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/06f7820d3c5fff95b0609c1e5830cc234a0b2741..9cef34d06f5f31983898c9972e8a0dc1126dedb3:/lib/python/enigma_python.i diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i index 21c0664a..ebe934a5 100644 --- a/lib/python/enigma_python.i +++ b/lib/python/enigma_python.i @@ -45,6 +45,7 @@ is usually caused by not marking PSignals as immutable. #include #include #include +#include #include #include #include @@ -98,6 +99,14 @@ extern int getPrevAsciiCode(); extern int isUTF8(const std::string &); extern std::string convertUTF8DVB(const std::string &, int); extern std::string convertDVBUTF8(const unsigned char *data, int len, int table, int tsidonid); +PyObject *getBestPlayableServiceReference(const eServiceReference &bouquet_ref, const eServiceReference &ignore) +{ + eStaticServiceDVBBouquetInformation info; + if (info.isPlayable(bouquet_ref, ignore)) + return New_eServiceReference(info.getPlayableService()); + Py_INCREF(Py_None); + return Py_None; +} %} %feature("ref") iObject "$this->AddRef(); /* eDebug(\"AddRef (%s:%d)!\", __FILE__, __LINE__); */ " @@ -273,6 +282,7 @@ int getPrevAsciiCode(); void runMainloop(); void quitMainloop(int exit_code); eApplication *getApplication(); +PyObject *getBestPlayableServiceReference(const eServiceReference &bouquet_ref, const eServiceReference &ignore); %{ RESULT SwigFromPython(ePtr &result, PyObject *obj) {