diff options
| author | Mladen Horvat <acid-burn@opendreambox.org> | 2011-04-13 16:17:43 +0200 |
|---|---|---|
| committer | Mladen Horvat <acid-burn@opendreambox.org> | 2011-04-13 16:17:43 +0200 |
| commit | 8a21c8eebc037850431ac627061e46e48e93a0ec (patch) | |
| tree | 16ea09f5e26546a98106bbf044575894037aa6e5 /lib/dvb/db.cpp | |
| parent | c3c412e8765520205b7cf8413ddf8abca74f1bc3 (diff) | |
| parent | 348cf0e4d7fa1e615635984c9325fc0e8fa4e72b (diff) | |
| download | enigma2-8a21c8eebc037850431ac627061e46e48e93a0ec.tar.gz enigma2-8a21c8eebc037850431ac627061e46e48e93a0ec.zip | |
Merge branch 'master' of git.opendreambox.org:/git/enigma2 into acid-burn/network_changes_next
Diffstat (limited to 'lib/dvb/db.cpp')
| -rw-r--r-- | lib/dvb/db.cpp | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index 522035eb..05474071 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; |
