Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PVR] Reset ischannelpreview flag when pvr stream gets closed. Fixes trac#16840. #10264

Merged
merged 3 commits into from Aug 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 24 additions & 6 deletions xbmc/GUIInfoManager.cpp
Expand Up @@ -9229,6 +9229,15 @@ bool CGUIInfoManager::GetDisplayAfterSeek()
void CGUIInfoManager::SetShowInfo(bool showinfo)
{
m_playerShowInfo = showinfo;

if (!showinfo)
m_isPvrChannelPreview = false;
}

bool CGUIInfoManager::ToggleShowInfo()

This comment was marked as spam.

{
SetShowInfo(!m_playerShowInfo);
return m_playerShowInfo;
}

void CGUIInfoManager::Clear()
Expand Down Expand Up @@ -10950,12 +10959,21 @@ bool CGUIInfoManager::ConditionsChangedValues(const std::map<INFO::InfoPtr, bool

bool CGUIInfoManager::IsPlayerChannelPreviewActive() const
{
bool streamValid = m_videoInfo.valid;
if (m_currentFile->HasPVRChannelInfoTag() && m_currentFile->GetPVRChannelInfoTag()->IsRadio())
streamValid = m_audioInfo.valid;

return m_playerShowInfo &&
(m_isPvrChannelPreview || !streamValid);
bool bReturn(false);
if (m_playerShowInfo)

This comment was marked as spam.

This comment was marked as spam.

{
if (m_isPvrChannelPreview)
{
bReturn = true;
}
else
{
bReturn = !m_videoInfo.valid;
if (bReturn && m_currentFile->HasPVRChannelInfoTag() && m_currentFile->GetPVRChannelInfoTag()->IsRadio())
bReturn = !m_audioInfo.valid;
}
}
return bReturn;
}

CEpgInfoTagPtr CGUIInfoManager::GetEpgInfoTag() const
Expand Down
2 changes: 1 addition & 1 deletion xbmc/GUIInfoManager.h
Expand Up @@ -200,7 +200,7 @@ friend CSetCurrentItemJob;
void SetShowTime(bool showtime) { m_playerShowTime = showtime; };
void SetShowInfo(bool showinfo);
bool GetShowInfo() const { return m_playerShowInfo; }
bool ToggleShowInfo() { m_playerShowInfo = !m_playerShowInfo; return m_playerShowInfo; };
bool ToggleShowInfo();
bool IsPlayerChannelPreviewActive() const;

std::string GetSystemHeatInfo(int info);
Expand Down
2 changes: 2 additions & 0 deletions xbmc/pvr/PVRManager.cpp
Expand Up @@ -1178,6 +1178,7 @@ void CPVRManager::CloseStream(void)
g_application.SaveFileState();
}

m_isChannelPreview = false;
m_addons->CloseStream();
SAFE_DELETE(m_currentFile);
}
Expand Down Expand Up @@ -1226,6 +1227,7 @@ void CPVRManager::UpdateCurrentChannel(void)
delete m_currentFile;
m_currentFile = new CFileItem(playingChannel);
UpdateItem(*m_currentFile);
m_isChannelPreview = false;
}
}

Expand Down