Skip to content

Commit

Permalink
Merge pull request #23385 from ksooo/pvr-timer-settings-type-change-f…
Browse files Browse the repository at this point in the history
…ix-nexus

[Nexus][PVR] Timer settings dialog: Set certain settings to default on change of timer type.
  • Loading branch information
ksooo committed Jun 10, 2023
2 parents 1e2d385 + 900f6ad commit 5eb7778
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp
Expand Up @@ -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"
}
Expand Down

0 comments on commit 5eb7778

Please sign in to comment.