From f3d3dbdfa918a39a4a752165d0f654d5019d1ea0 Mon Sep 17 00:00:00 2001 From: emveepee Date: Tue, 24 Aug 2021 18:17:42 -0400 Subject: [PATCH] Recording group check (#177) PVRTypeIntValue vectors need to be checked for empty or size zero before adding Co-authored-by: emveepee --- pvr.nextpvr/addon.xml.in | 2 +- pvr.nextpvr/changelog.txt | 3 +++ src/Timers.cpp | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pvr.nextpvr/addon.xml.in b/pvr.nextpvr/addon.xml.in index 02e42849..f56a825c 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 c1faa8d9..ff103066 100644 --- a/pvr.nextpvr/changelog.txt +++ b/pvr.nextpvr/changelog.txt @@ -1,3 +1,6 @@ +v8.2.7 +- Check if recording groups have already been added + v8.2.6 - Kodi has a limit of 32 EDL breaks in PVR diff --git a/src/Timers.cpp b/src/Timers.cpp index d0b71183..6c26c117 100644 --- a/src/Timers.cpp +++ b/src/Timers.cpp @@ -412,9 +412,12 @@ PVR_ERROR Timers::GetTimerTypes(std::vector& types) /* PVR_Timer.iRecordingGroup values and presentation */ static std::vector recordingGroupValues; - for (unsigned int i = 0; i < m_settings.m_recordingDirectories.size(); ++i) + if (recordingGroupValues.size() == 0) { - recordingGroupValues.emplace_back(kodi::addon::PVRTypeIntValue(i, m_settings.m_recordingDirectories[i])); + for (unsigned int i = 0; i < m_settings.m_recordingDirectories.size(); ++i) + { + recordingGroupValues.emplace_back(kodi::addon::PVRTypeIntValue(i, m_settings.m_recordingDirectories[i])); + } } static const unsigned int TIMER_MANUAL_ATTRIBS