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" || 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)
{
- eServiceReference service(eServiceFactoryDVB::id,
+ eServiceReference service(type,
0,
filename);
service.data[0] = 0;