theoretic support for PiP (will be fixed)
[enigma2.git] / lib / service / servicefs.cpp
index 22d8cf65e3b7b214cca53d70645ff4fcb773f9fd..3e2f97b3f3845ba1b4bb7ff6619639b17355f439 100644 (file)
@@ -129,12 +129,21 @@ RESULT eServiceFS::getContent(std::list<eServiceReference> &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")
+                       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)