From: Felix Domke Date: Thu, 23 Mar 2006 10:32:46 +0000 (+0000) Subject: allow some more media types, fix extension detection X-Git-Tag: 2.6.0~3775 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/a25eb4663f5c89f52a1fffeef462df858d66940d allow some more media types, fix extension detection --- diff --git a/lib/service/servicefs.cpp b/lib/service/servicefs.cpp index 22d8cf65..c53e055e 100644 --- a/lib/service/servicefs.cpp +++ b/lib/service/servicefs.cpp @@ -129,13 +129,20 @@ RESULT eServiceFS::getContent(std::list &list, bool sorted) list.push_back(service); } else { - std::string extension = filename.substr(filename.rfind('.')); + 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" || extension == ".ogg" || extension == ".avi") type = 4097; + else if (extension == ".ogg") + type = 4097; + else if (extension == ".mpg") + type = 4097; + else if (extension == ".vob") + type = 4097; if (type != -1) {