aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/addons/binary/interfaces/api1/PVR/AddonCallbacksPVR.cpp2
-rw-r--r--xbmc/epg/GUIEPGGridContainerModel.cpp2
-rw-r--r--xbmc/pvr/PVRManager.cpp6
-rw-r--r--xbmc/pvr/PVRManager.h9
-rw-r--r--xbmc/pvr/addons/PVRClients.cpp5
-rw-r--r--xbmc/pvr/addons/PVRClients.h2
6 files changed, 14 insertions, 12 deletions
diff --git a/xbmc/addons/binary/interfaces/api1/PVR/AddonCallbacksPVR.cpp b/xbmc/addons/binary/interfaces/api1/PVR/AddonCallbacksPVR.cpp
index 3d35cfecf7..65294c0e97 100644
--- a/xbmc/addons/binary/interfaces/api1/PVR/AddonCallbacksPVR.cpp
+++ b/xbmc/addons/binary/interfaces/api1/PVR/AddonCallbacksPVR.cpp
@@ -345,7 +345,7 @@ void CAddonCallbacksPVR::PVRConnectionStateChange(void* addonData, const char* s
if (strMessage != nullptr)
msg = strMessage;
- g_PVRManager.ConnectionStateChange(client->GetID(), std::string(strConnectionString), newState, msg);
+ g_PVRManager.ConnectionStateChange(client, std::string(strConnectionString), newState, msg);
}
typedef struct EpgEventStateChange
diff --git a/xbmc/epg/GUIEPGGridContainerModel.cpp b/xbmc/epg/GUIEPGGridContainerModel.cpp
index f2001fee9f..dbc867cdd1 100644
--- a/xbmc/epg/GUIEPGGridContainerModel.cpp
+++ b/xbmc/epg/GUIEPGGridContainerModel.cpp
@@ -155,6 +155,8 @@ void CGUIEPGGridContainerModel::Refresh(const std::unique_ptr<CFileItemList> &it
m_blocks = (gridDuration.GetDays() * 24 * 60 + gridDuration.GetHours() * 60 + gridDuration.GetMinutes()) / MINSPERBLOCK;
if (m_blocks >= MAXBLOCKS)
m_blocks = MAXBLOCKS;
+ else if (m_blocks < iBlocksPerPage)
+ m_blocks = iBlocksPerPage;
m_gridIndex.reserve(m_channelItems.size());
const std::vector<GridItem> blocks(m_blocks);
diff --git a/xbmc/pvr/PVRManager.cpp b/xbmc/pvr/PVRManager.cpp
index ac36d7e6de..0e4f7ba693 100644
--- a/xbmc/pvr/PVRManager.cpp
+++ b/xbmc/pvr/PVRManager.cpp
@@ -1817,9 +1817,9 @@ void CPVRManager::TriggerSearchMissingChannelIcons(void)
CJobManager::GetInstance().AddJob(new CPVRSearchMissingChannelIconsJob(), NULL);
}
-void CPVRManager::ConnectionStateChange(int clientId, std::string connectString, PVR_CONNECTION_STATE state, std::string message)
+void CPVRManager::ConnectionStateChange(CPVRClient *client, std::string connectString, PVR_CONNECTION_STATE state, std::string message)
{
- CJobManager::GetInstance().AddJob(new CPVRClientConnectionJob(clientId, connectString, state, message), NULL);
+ CJobManager::GetInstance().AddJob(new CPVRClientConnectionJob(client, connectString, state, message), NULL);
}
void CPVRManager::ExecutePendingJobs(void)
@@ -1871,7 +1871,7 @@ bool CPVRSearchMissingChannelIconsJob::DoWork(void)
bool CPVRClientConnectionJob::DoWork(void)
{
- g_PVRClients->ConnectionStateChange(m_clientId, m_connectString, m_state, m_message);
+ g_PVRClients->ConnectionStateChange(m_client, m_connectString, m_state, m_message);
return true;
}
diff --git a/xbmc/pvr/PVRManager.h b/xbmc/pvr/PVRManager.h
index 0c55e4f7ba..56561e094e 100644
--- a/xbmc/pvr/PVRManager.h
+++ b/xbmc/pvr/PVRManager.h
@@ -49,6 +49,7 @@ namespace EPG
namespace PVR
{
+ class CPVRClient;
class CPVRClients;
class CPVRChannel;
typedef std::shared_ptr<CPVRChannel> CPVRChannelPtr;
@@ -554,7 +555,7 @@ private:
/*!
* @brief Signal a connection change of a client
*/
- void ConnectionStateChange(int clientId, std::string connectString, PVR_CONNECTION_STATE state, std::string message);
+ void ConnectionStateChange(CPVRClient *client, std::string connectString, PVR_CONNECTION_STATE state, std::string message);
/*!
* @brief Explicitly set the state of channel preview. This is when channel is displayed on OSD without actually switching
@@ -773,14 +774,14 @@ private:
class CPVRClientConnectionJob : public CJob
{
public:
- CPVRClientConnectionJob(int clientId, std::string connectString, PVR_CONNECTION_STATE state, std::string message) :
- m_clientId(clientId), m_connectString(connectString), m_state(state), m_message(message) {}
+ CPVRClientConnectionJob(CPVRClient *client, std::string connectString, PVR_CONNECTION_STATE state, std::string message)
+ : m_client(client), m_connectString(connectString), m_state(state), m_message(message) {}
virtual ~CPVRClientConnectionJob() {}
virtual const char *GetType() const { return "pvr-client-connection"; }
virtual bool DoWork();
private:
- int m_clientId;
+ CPVRClient *m_client;
std::string m_connectString;
PVR_CONNECTION_STATE m_state;
std::string m_message;
diff --git a/xbmc/pvr/addons/PVRClients.cpp b/xbmc/pvr/addons/PVRClients.cpp
index b44b6c6690..7e89c3f062 100644
--- a/xbmc/pvr/addons/PVRClients.cpp
+++ b/xbmc/pvr/addons/PVRClients.cpp
@@ -1495,11 +1495,10 @@ bool CPVRClients::IsRealTimeStream(void) const
return false;
}
-void CPVRClients::ConnectionStateChange(int clientId, std::string &strConnectionString, PVR_CONNECTION_STATE newState,
+void CPVRClients::ConnectionStateChange(CPVRClient *client, std::string &strConnectionString, PVR_CONNECTION_STATE newState,
std::string &strMessage)
{
- PVR_CLIENT client;
- if (!GetClient(clientId, client))
+ if (!client)
{
CLog::Log(LOGDEBUG, "PVR - %s - invalid client id", __FUNCTION__);
return;
diff --git a/xbmc/pvr/addons/PVRClients.h b/xbmc/pvr/addons/PVRClients.h
index d5ee5bc687..dd84d808e2 100644
--- a/xbmc/pvr/addons/PVRClients.h
+++ b/xbmc/pvr/addons/PVRClients.h
@@ -659,7 +659,7 @@ namespace PVR
bool IsRealTimeStream() const;
- void ConnectionStateChange(int clientId, std::string &strConnectionString, PVR_CONNECTION_STATE newState,
+ void ConnectionStateChange(CPVRClient *client, std::string &strConnectionString, PVR_CONNECTION_STATE newState,
std::string &strMessage);
/*!