mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
Revert "speed up starting neutrino while loading xmltv logos"
This reverts commit 7f57c687bb658ae7cec251e241f138e4b1687fb0. Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -178,8 +178,6 @@ class CZapitChannel
|
|||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
friend class CChannelList;
|
friend class CChannelList;
|
||||||
pthread_t thrLogo;
|
|
||||||
static void* LogoThread(void* channel);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef enum channel_flags {
|
typedef enum channel_flags {
|
||||||
@@ -298,7 +296,6 @@ class CZapitChannel
|
|||||||
void setEPGid(t_channel_id pEPGid) { epg_id = pEPGid; } //remap epg_id
|
void setEPGid(t_channel_id pEPGid) { epg_id = pEPGid; } //remap epg_id
|
||||||
std::string getAlternateLogo(void) const { return altlogo; }
|
std::string getAlternateLogo(void) const { return altlogo; }
|
||||||
inline void setAlternateLogo(const std::string &pLogo) { altlogo = pLogo; }
|
inline void setAlternateLogo(const std::string &pLogo) { altlogo = pLogo; }
|
||||||
void setThrAlternateLogo(const std::string &pLogo);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CmpChannelBySat: public std::binary_function <const CZapitChannel * const, const CZapitChannel * const, bool>
|
struct CmpChannelBySat: public std::binary_function <const CZapitChannel * const, const CZapitChannel * const, bool>
|
||||||
|
@@ -1037,7 +1037,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, url, desc.c_str(), chid, epg_script.c_str(), mode);
|
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, url, desc.c_str(), chid, epg_script.c_str(), mode);
|
||||||
CServiceManager::getInstance()->AddChannel(channel);
|
CServiceManager::getInstance()->AddChannel(channel);
|
||||||
if (!alogo.empty())
|
if (!alogo.empty())
|
||||||
channel->setThrAlternateLogo(alogo);
|
channel->setAlternateLogo(downloadUrlToRandomFile(alogo, LOGODIR_TMP));
|
||||||
channel->flags = CZapitChannel::UPDATED;
|
channel->flags = CZapitChannel::UPDATED;
|
||||||
if (gbouquet)
|
if (gbouquet)
|
||||||
gbouquet->addService(channel);
|
gbouquet->addService(channel);
|
||||||
|
@@ -112,7 +112,6 @@ void CZapitChannel::Init()
|
|||||||
bLockCount = 0;
|
bLockCount = 0;
|
||||||
bLocked = DEFAULT_CH_LOCKED;
|
bLocked = DEFAULT_CH_LOCKED;
|
||||||
bUseCI = false;
|
bUseCI = false;
|
||||||
thrLogo = 0;
|
|
||||||
altlogo = "";
|
altlogo = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,29 +423,3 @@ void CZapitChannel::dumpBouquetXml(FILE * fd, bool bUser)
|
|||||||
|
|
||||||
fprintf(fd, "/>\n");
|
fprintf(fd, "/>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CZapitChannel::setThrAlternateLogo(const std::string &pLogo)
|
|
||||||
{
|
|
||||||
//printf("CZapitChannel::setAlternateLogo: [%s]\n", pLogo.c_str());
|
|
||||||
|
|
||||||
altlogo = pLogo;
|
|
||||||
|
|
||||||
if(thrLogo != 0)
|
|
||||||
{
|
|
||||||
pthread_cancel(thrLogo);
|
|
||||||
pthread_join(thrLogo, NULL);
|
|
||||||
thrLogo = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_create(&thrLogo, NULL, LogoThread, (void *)this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void* CZapitChannel::LogoThread(void* channel)
|
|
||||||
{
|
|
||||||
CZapitChannel *cc = (CZapitChannel *)channel;
|
|
||||||
if (cc)
|
|
||||||
cc->setAlternateLogo(downloadUrlToRandomFile(cc->getAlternateLogo(), LOGODIR_TMP));
|
|
||||||
|
|
||||||
pthread_exit(0);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user