Skip to content

Commit

Permalink
Recording group check (#177)
Browse files Browse the repository at this point in the history
PVRTypeIntValue vectors need to be checked for empty or size zero before adding

Co-authored-by: emveepee <nospam>
  • Loading branch information
emveepee authored Aug 24, 2021
1 parent d6063ca commit f3d3dbd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pvr.nextpvr/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.nextpvr"
version="8.2.6"
version="8.2.7"
name="NextPVR PVR Client"
provider-name="Graeme Blackley">
<requires>@ADDON_DEPENDS@
Expand Down
3 changes: 3 additions & 0 deletions pvr.nextpvr/changelog.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 5 additions & 2 deletions src/Timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,12 @@ PVR_ERROR Timers::GetTimerTypes(std::vector<kodi::addon::PVRTimerType>& types)

/* PVR_Timer.iRecordingGroup values and presentation */
static std::vector<kodi::addon::PVRTypeIntValue> 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
Expand Down

0 comments on commit f3d3dbd

Please sign in to comment.