{
}
+int lower(char c)
+{
+ return std::tolower(static_cast<unsigned char>(c));
+}
+
RESULT eServiceFS::getContent(std::list<eServiceReference> &list, bool sorted)
{
DIR *d=opendir(path.c_str());
{
size_t e = filename.rfind('.');
std::string extension = (e != std::string::npos) ? filename.substr(e) : "";
+ std::transform(extension.begin(), extension.end(), extension.begin(), lower);
int type = -1;
if (extension == ".ts")
type = 4097;
else if (extension == ".wav" || extension == ".wave")
type = 4097;
- else if (extension == ".m3u" || extension == ".pls" || extension == ".e2")
+ else if (extension == ".m3u" || extension == ".pls" || extension == ".e2pls")
type = 4098;
if (type != -1)
// useable format options are
// R = Service Reference (as swig object .. this is very slow)
// S = Service Reference (as python string object .. same as ref.toString())
+// C = Service Reference (as python string object .. same as ref.toCompareString())
// N = Service Name (as python string object)
// when exactly one return value per service is selected in the format string,
// then each value is directly a list entry
case 'R': // service reference (swig)object
tmp = New_eServiceReference(ref);
break;
+ case 'C': // service reference compare string
+ tmp = PyString_FromString(ref.toCompareString().c_str());
+ break;
case 'S': // service reference string
tmp = PyString_FromString(ref.toString().c_str());
break;