X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fdb.cpp;h=0547407132b3b9e765e83d4314b63cb89095398b;hp=522035eb7585b751c0f22bf6ac117ea0bdc03ed9;hb=849b33656dc710cfa5f644a55680fd396ab1d8d7;hpb=dec9693d8437a31dab8e4010b33b57e1476a315c diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index 522035e..0547407 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -325,19 +325,11 @@ void eDVBDB::loadServicelist(const char *file) { eDebug("---- opening lame channel db"); FILE *f=fopen(file, "rt"); - if (!f && strcmp(file, eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str()) == 0) - { - struct stat s; - if ( !stat("lamedb", &s) ) - { - if ( !stat(eEnv::resolve("${sysconfdir}/enigma2").c_str(), &s) ) - { - rename("lamedb", eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str()); - reloadServicelist(); - } - } + if (!f) { + eDebug("can't open %s: %m", file); return; } + char line[256]; int version=3; if ((!fgets(line, 256, f)) || sscanf(line, "eDVB services /%d/", &version) != 1) @@ -623,24 +615,16 @@ void eDVBDB::loadBouquet(const char *path) p+=path; eDebug("loading bouquet... %s", p.c_str()); FILE *fp=fopen(p.c_str(), "rt"); - int entries=0; if (!fp) { - struct stat s; - if ( !stat(path, &s) ) - { - rename(path, p.c_str() ); - loadBouquet(path); - return; - } - eDebug("failed to open."); - if ( strstr(path, "bouquets.tv") ) + eDebug("can't open %s: %m", p.c_str()); + if (!strcmp(path, "bouquets.tv")) { eDebug("recreate bouquets.tv"); bouquet.m_bouquet_name="Bouquets (TV)"; bouquet.flushChanges(); } - else if ( strstr(path, "bouquets.radio") ) + else if (!strcmp(path, "bouquets.radio")) { eDebug("recreate bouquets.radio"); bouquet.m_bouquet_name="Bouquets (Radio)"; @@ -648,6 +632,7 @@ void eDVBDB::loadBouquet(const char *path) } return; } + int entries=0; char line[256]; bool read_descr=false; eServiceReference *e = NULL;