diff --git a/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp b/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp index 2ac775c139b5e..26efe225431d9 100644 --- a/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp +++ b/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp @@ -563,8 +563,14 @@ void CGUIDialogPVRTimerSettings::Save() m_timerInfoTag->m_iClientId = m_timerType->GetClientId(); } - m_timerInfoTag->m_bStartAnyTime = m_bStartAnyTime; - m_timerInfoTag->m_bEndAnyTime = m_bEndAnyTime; + if (m_timerType->SupportsStartAnyTime() && m_timerType->IsEpgBased()) // Start anytime toggle is displayed + m_timerInfoTag->m_bStartAnyTime = m_bStartAnyTime; + else + m_bStartAnyTime = false; // Assume start time change needs checking for + if (m_timerType->SupportsEndAnyTime() && m_timerType->IsEpgBased()) // End anytime toggle is displayed + m_timerInfoTag->m_bEndAnyTime = m_bEndAnyTime; + else + m_bEndAnyTime = false; // Assume end time change needs checking for // Begin and end time const CDateTime now(CDateTime::GetCurrentDateTime()); if (!m_bStartAnyTime && !m_bEndAnyTime) @@ -1129,6 +1135,10 @@ bool CGUIDialogPVRTimerSettings::StartAnytimeSetCondition(const std::string &con if (!pThis->m_timerType->IsEpgBased()) return true; + // If 'Start anytime' option isn't supported, don't hide start time + if (!pThis->m_timerType->SupportsStartAnyTime()) + return true; + std::string cond(condition); cond.erase(cond.find(START_ANYTIME_DEP_VISIBI_COND_ID_POSTFIX)); @@ -1168,6 +1178,10 @@ bool CGUIDialogPVRTimerSettings::EndAnytimeSetCondition(const std::string &condi if (!pThis->m_timerType->IsEpgBased()) return true; + // If 'End anytime' option isn't supported, don't hide end time + if (!pThis->m_timerType->SupportsEndAnyTime()) + return true; + std::string cond(condition); cond.erase(cond.find(END_ANYTIME_DEP_VISIBI_COND_ID_POSTFIX));