From 4fecb1e8cea31898ced570aa273a8131a485b7b9 Mon Sep 17 00:00:00 2001 From: emveepee Date: Thu, 8 Dec 2022 15:04:54 -0500 Subject: [PATCH] Reorder timer definition (#224) Kodi core adds the first defined timer to the setting types even when it fails attribute checks. Backport from PR 223 Co-authored-by: Alfonso Cachero Translate-URL: https://kodi.weblate.cloud/projects/kodi-add-ons-pvr-clients/pvr-nextpvr/es_es/ Translation: Kodi add-ons: PVR clients/pvr.nextpvr Co-authored-by: Alfonso Cachero Co-authored-by: Weblate (bot) Co-authored-by: Alfonso Cachero --- pvr.nextpvr/addon.xml.in | 2 +- pvr.nextpvr/changelog.txt | 3 +++ src/Timers.cpp | 18 +++++++++--------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/pvr.nextpvr/addon.xml.in b/pvr.nextpvr/addon.xml.in index b588ed46..e8a8c7e4 100644 --- a/pvr.nextpvr/addon.xml.in +++ b/pvr.nextpvr/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.nextpvr/changelog.txt b/pvr.nextpvr/changelog.txt index bc659a26..ee982c27 100644 --- a/pvr.nextpvr/changelog.txt +++ b/pvr.nextpvr/changelog.txt @@ -1,3 +1,6 @@ +v19.0.6 +- Reorder timers so valid entry timer is default + v19.0.5 - Backport advanced recording title search from PR 220 diff --git a/src/Timers.cpp b/src/Timers.cpp index 33dc3be0..78ab4a61 100644 --- a/src/Timers.cpp +++ b/src/Timers.cpp @@ -486,26 +486,26 @@ PVR_ERROR Timers::GetTimerTypes(std::vector& types) PVR_TIMER_TYPE_SUPPORTS_START_END_MARGIN; /* Timer types definition.*/ - TimerType* t = t = new TimerType( + /* One-shot manual (time and channel based) */ + TimerType* t = new TimerType( /* Type id. */ - TIMER_ONCE_EPG, + TIMER_ONCE_MANUAL, /* Attributes. */ - TIMER_EPG_ATTRIBS, + TIMER_MANUAL_ATTRIBS, /* Description. */ - kodi::GetLocalizedString(MSG_ONETIME_GUIDE), // "One time (guide)", + kodi::GetLocalizedString(MSG_ONETIME_MANUAL), // "One time (manual)", /* Values definitions for attributes. */ recordingLimitValues, m_defaultLimit, showTypeValues, m_defaultShowType, recordingGroupValues, 0); types.emplace_back(*t); delete t; - t =new TimerType( - /* One-shot manual (time and channel based) */ + t = new TimerType( /* Type id. */ - TIMER_ONCE_MANUAL, + TIMER_ONCE_EPG, /* Attributes. */ - TIMER_MANUAL_ATTRIBS, + TIMER_EPG_ATTRIBS, /* Description. */ - kodi::GetLocalizedString(MSG_ONETIME_MANUAL), // "One time (manual)", + kodi::GetLocalizedString(MSG_ONETIME_GUIDE), // "One time (guide)", /* Values definitions for attributes. */ recordingLimitValues, m_defaultLimit, showTypeValues, m_defaultShowType, recordingGroupValues, 0); types.emplace_back(*t);