fix no more working sec with old api
[enigma2.git] / lib / dvb / epgcache.cpp
index afbc6e011f4a03ce13f650b9e9b91230b0f4a43f..6c98011b70570770506f3ca1747f8860e1d9d706 100644 (file)
@@ -226,7 +226,11 @@ eEPGCache::eEPGCache()
        if (!res_mgr)
                eDebug("[eEPGCache] no resource manager !!!!!!!");
        else
+       {
                res_mgr->connectChannelAdded(slot(*this,&eEPGCache::DVBChannelAdded), m_chanAddedConn);
+               if (eDVBLocalTimeHandler::getInstance()->ready())
+                       timeUpdated();
+       }
        instance=this;
 }
 
@@ -857,10 +861,10 @@ void eEPGCache::thread()
 
 void eEPGCache::load()
 {
-       singleLock s(cache_lock);
        FILE *f = fopen("/hdd/epg.dat", "r");
        if (f)
        {
+               unlink("/hdd/epg.dat");
                int size=0;
                int cnt=0;
 #if 0
@@ -894,6 +898,7 @@ void eEPGCache::load()
                        fread( text1, 13, 1, f);
                        if ( !strncmp( text1, "ENIGMA_EPG_V7", 13) )
                        {
+                               singleLock s(cache_lock);
                                fread( &size, sizeof(int), 1, f);
                                while(size--)
                                {