Skip to content

Commit

Permalink
Revert "[epg] fixed - epg load/update was interrupted when the pvr ma…
Browse files Browse the repository at this point in the history
…nager imports channels, leading to delays and channel ids gone missing in certain situations"

This reverts commit bdf8842.

Conflicts:

	xbmc/pvr/PVRManager.h
  • Loading branch information
nemphys committed Aug 6, 2013
1 parent 3244000 commit 75c8a08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
6 changes: 0 additions & 6 deletions xbmc/epg/EpgContainer.cpp
Expand Up @@ -259,12 +259,6 @@ void CEpgContainer::Process(void)
bool bUpdateEpg(true);
bool bHasPendingUpdates(false);

if (!CPVRManager::Get().WaitUntilInitialised())
{
CLog::Log(LOGDEBUG, "EPG - %s - pvr manager failed to load - exiting", __FUNCTION__);
return;
}

while (!m_bStop && !g_application.m_bStop)
{
CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(iNow);
Expand Down
14 changes: 3 additions & 11 deletions xbmc/pvr/PVRManager.cpp
Expand Up @@ -262,12 +262,6 @@ bool CPVRManager::UpgradeOutdatedAddons(void)
return false;
}

bool CPVRManager::WaitUntilInitialised(void)
{
return m_initialisedEvent.Wait() &&
IsStarted();
}

void CPVRManager::Cleanup(void)
{
CSingleLock lock(m_critSection);
Expand All @@ -291,7 +285,6 @@ void CPVRManager::Cleanup(void)
delete m_pendingUpdates.at(iJobPtr);
m_pendingUpdates.clear();

m_initialisedEvent.Reset();
SetState(ManagerStateStopped);
}

Expand Down Expand Up @@ -354,8 +347,6 @@ void CPVRManager::Start(bool bAsync /* = false */, bool bOpenPVRWindow /* = fals
m_database = new CPVRDatabase;
m_database->Open();

g_EpgContainer.Start();

/* create the supervisor thread to do all background activities */
StartUpdateThreads();
}
Expand All @@ -370,7 +361,6 @@ void CPVRManager::Stop(void)
SetState(ManagerStateStopping);

/* stop the EPG updater, since it might be using the pvr add-ons */
m_initialisedEvent.Set();
g_EpgContainer.Stop();

CLog::Log(LOGNOTICE, "PVRManager - stopping");
Expand Down Expand Up @@ -410,6 +400,8 @@ void CPVRManager::SetState(ManagerState state)

void CPVRManager::Process(void)
{
g_EpgContainer.Stop();

/* load the pvr data from the db and clients if it's not already loaded */
while (!Load() && GetState() == ManagerStateStarting)
{
Expand All @@ -427,7 +419,7 @@ void CPVRManager::Process(void)

/* main loop */
CLog::Log(LOGDEBUG, "PVRManager - %s - entering main loop", __FUNCTION__);
m_initialisedEvent.Set();
g_EpgContainer.Start();

if (m_bOpenPVRWindow)
{
Expand Down
1 change: 0 additions & 1 deletion xbmc/pvr/PVRManager.h
Expand Up @@ -636,7 +636,6 @@ namespace PVR
CStopWatch *m_parentalTimer;
bool m_bOpenPVRWindow;
std::map<std::string, std::string> m_outdatedAddons;
CEvent m_initialisedEvent; /*!< triggered when the pvr manager initialised */
};

class CPVREpgsCreateJob : public CJob
Expand Down

0 comments on commit 75c8a08

Please sign in to comment.