diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-03-14 14:38:02 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-03-14 14:38:02 +0000 |
| commit | dd81aa4811e3438df86e161a8728223ff3d252f5 (patch) | |
| tree | 9d5b9e2aa97b33ebb4e5f4fc237ec6679e1b149c | |
| parent | 94f8049fca5c1522aef72334ab4f4697600618c0 (diff) | |
| download | enigma2-dd81aa4811e3438df86e161a8728223ff3d252f5.tar.gz enigma2-dd81aa4811e3438df86e161a8728223ff3d252f5.zip | |
list mp3 files. we need something better here.
| -rw-r--r-- | lib/service/servicefs.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/service/servicefs.cpp b/lib/service/servicefs.cpp index 8254e63b..2590993a 100644 --- a/lib/service/servicefs.cpp +++ b/lib/service/servicefs.cpp @@ -129,10 +129,17 @@ RESULT eServiceFS::getContent(std::list<eServiceReference> &list, bool sorted) list.push_back(service); } else { - /* FIIIIIX ME */ - if (filename.substr(filename.size()-3) == ".ts") + std::string extension = filename.substr(filename.rfind('.')); + int type = -1; + + if (extension == ".ts") + type = eServiceFactoryDVB::id; + else if (extension == ".mp3") + type = 4097; + + if (type != -1) { - eServiceReference service(eServiceFactoryDVB::id, + eServiceReference service(type, 0, filename); service.data[0] = 0; |
