dont try to get frontend informations when the eDVBServicePlay is a pvr service
[enigma2.git] / lib / service / servicefs.cpp
index 5b5957e..1afdd16 100644 (file)
@@ -33,7 +33,7 @@ eServiceFactoryFS::eServiceFactoryFS()
 {
        ePtr<eServiceCenter> sc;
        
-       eServiceCenter::getInstance(sc);
+       eServiceCenter::getPrivInstance(sc);
        if (sc)
                sc->addServiceFactory(eServiceFactoryFS::id, this);
        
@@ -44,7 +44,7 @@ eServiceFactoryFS::~eServiceFactoryFS()
 {
        ePtr<eServiceCenter> sc;
        
-       eServiceCenter::getInstance(sc);
+       eServiceCenter::getPrivInstance(sc);
        if (sc)
                sc->removeServiceFactory(eServiceFactoryFS::id);
 }
@@ -139,6 +139,7 @@ RESULT eServiceFS::getContent(std::list<eServiceReference> &list)
                        }
                }
        }
+       closedir(d);
        return 0;
 }
 
@@ -163,4 +164,22 @@ RESULT eServiceFS::getNext(eServiceReference &ptr)
        return 0;
 }
 
+int eServiceFS::compareLessEqual(const eServiceReference &a, const eServiceReference &b)
+{
+               /* directories first */
+       if ((a.flags & ~b.flags) & eServiceReference::isDirectory)
+               return 1;
+       else if ((~a.flags & b.flags) & eServiceReference::isDirectory)
+               return 0;
+               /* sort by filename */
+       else
+               return a.path < b.path;
+}
+
+RESULT eServiceFS::startEdit(ePtr<iMutableServiceList> &res)
+{
+       res = 0;
+       return -1;
+}
+
 eAutoInitPtr<eServiceFactoryFS> init_eServiceFactoryFS(eAutoInitNumbers::service+1, "eServiceFactoryFS");