diff options
author | ksooo <3226626+ksooo@users.noreply.github.com> | 2023-06-10 21:36:58 +0200 |
---|---|---|
committer | ksooo <3226626+ksooo@users.noreply.github.com> | 2023-06-10 21:40:42 +0200 |
commit | 900f6ad8c78d2b261237aac79e7021e597164cf9 (patch) | |
tree | af873c618ddb7a7c04669788889ed83bb51dbc70 | |
parent | 1e2d385483ec87f32a9c5e0290c96207701c0fc0 (diff) | |
download | xbmc-900f6ad8c78d2b261237aac79e7021e597164cf9.tar.xz |
[PVR] Timer settings dialog: Set certain settings to default on change of timer type.
-rw-r--r-- | xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp b/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp index afc33543e5..f7866278e7 100644 --- a/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp +++ b/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp @@ -445,6 +445,23 @@ void CGUIDialogPVRTimerSettings::OnSettingChanged(const std::shared_ptr<const CS { m_timerType = it->second; + // reset certain settings to the defaults of the new timer type + + if (m_timerType->SupportsPriority()) + m_iPriority = m_timerType->GetPriorityDefault(); + + if (m_timerType->SupportsLifetime()) + m_iLifetime = m_timerType->GetLifetimeDefault(); + + if (m_timerType->SupportsMaxRecordings()) + m_iMaxRecordings = m_timerType->GetMaxRecordingsDefault(); + + if (m_timerType->SupportsRecordingGroup()) + m_iRecordingGroup = m_timerType->GetRecordingGroupDefault(); + + if (m_timerType->SupportsRecordOnlyNewEpisodes()) + m_iPreventDupEpisodes = m_timerType->GetPreventDuplicateEpisodesDefault(); + if (m_timerType->IsTimerRule() && (m_iWeekdays == PVR_WEEKDAY_ALLDAYS)) SetButtonLabels(); // update "Any day" vs. "Every day" } |