use e2 functions to merge config and services
[enigma2.git] / lib / dvb / db.cpp
index b9d1108f9dda534f80668988974e624da651b02b..e1b19175d62fb00227e3d720423c04797f9bda47 100644 (file)
@@ -260,12 +260,17 @@ void eDVBService::setCacheEntry(cacheID id, int pid)
 
 DEFINE_REF(eDVBDB);
 
-       /* THIS CODE IS BAD. it should be replaced by somethine better. */
 void eDVBDB::reloadServicelist()
+{
+       loadServicelist(CONFIGDIR"/enigma2/lamedb");
+}
+
+       /* THIS CODE IS BAD. it should be replaced by somethine better. */
+void eDVBDB::loadServicelist(const char *file)
 {
        eDebug("---- opening lame channel db");
-       FILE *f=fopen(CONFIGDIR"/enigma2/lamedb", "rt");
-       if (!f)
+       FILE *f=fopen(file, "rt");
+       if (!f && strcmp(file, CONFIGDIR"/enigma2/lamedb") == 0)
        {
                struct stat s;
                if ( !stat("lamedb", &s) )