aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-03-23 10:32:46 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-03-23 10:32:46 +0000
commita25eb4663f5c89f52a1fffeef462df858d66940d (patch)
tree271fe1e1a97cfb3ee0913e2d362bd7a1e7cd619b
parentece69e7e0ae5069dc5d7a89f826942be266a5052 (diff)
downloadenigma2-a25eb4663f5c89f52a1fffeef462df858d66940d.tar.gz
enigma2-a25eb4663f5c89f52a1fffeef462df858d66940d.zip
allow some more media types, fix extension detection
-rw-r--r--lib/service/servicefs.cpp9
1 files changed, 8 insertions, 1 deletions
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<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")
type = 4097;
+ else if (extension == ".ogg")
+ type = 4097;
+ else if (extension == ".mpg")
+ type = 4097;
+ else if (extension == ".vob")
+ type = 4097;
if (type != -1)
{