X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/5ff227c657e02ebe2bc719faf4bd2231a04850c8..af50298c0edc3e108433acc9106d9a022447d44e:/lib/service/servicefs.cpp diff --git a/lib/service/servicefs.cpp b/lib/service/servicefs.cpp index 8254e63b..3e2f97b3 100644 --- a/lib/service/servicefs.cpp +++ b/lib/service/servicefs.cpp @@ -129,10 +129,26 @@ RESULT eServiceFS::getContent(std::list &list, bool sorted) list.push_back(service); } else { - /* FIIIIIX ME */ - if (filename.substr(filename.size()-3) == ".ts") + size_t e = filename.rfind('.'); + std::string extension = (e != std::string::npos) ? filename.substr(e) : ""; + int type = -1; + + if (extension == ".ts") + type = eServiceFactoryDVB::id; + else if (extension == ".mp3") + type = 4097; + else if (extension == ".ogg") + type = 4097; + else if (extension == ".mpg") + type = 4097; + else if (extension == ".vob") + type = 4097; + else if (extension == ".wav" || extension == ".wave") + type = 4097; + + if (type != -1) { - eServiceReference service(eServiceFactoryDVB::id, + eServiceReference service(type, 0, filename); service.data[0] = 0;