From e6ca74c1a497bd82ca62aa74738d4543043d8656 Mon Sep 17 00:00:00 2001
From: Frank Phillips <frankalso@gmail.com>
Date: Thu, 10 Apr 2014 19:07:14 -0500
Subject: [PATCH] Keep some recordings from getting a LiveTV recgroup

Following #10943, an ApplyRecordRecGroupChange() was added near the end of GetProgramRingBufferForLiveTV() to update recorded.recgroup before it is queried in StartedRecording().

The problem arises because we don't have the correct recstartts for ApplyRecordRecGroupChange() until later when we successfully insert the program in RecordingInfo::StartedRecording.

Fixes #11119
---
 mythtv/libs/libmythtv/tv_rec.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
index 20c5f23..dddffd2 100644
--- a/mythtv/libs/libmythtv/tv_rec.cpp
+++ b/mythtv/libs/libmythtv/tv_rec.cpp
@@ -803,7 +803,7 @@ void TVRec::StartedRecording(RecordingInfo *curRec)
     if (curRec->IsCommercialFree())
         curRec->SaveCommFlagged(COMM_FLAG_COMMFREE);
 
-    AutoRunInitType t = (curRec->QueryRecordingGroup() == "LiveTV") ?
+    AutoRunInitType t = (curRec->GetRecordingGroup() == "LiveTV") ?
         kAutoRunNone : kAutoRunProfile;
     InitAutoRunJobs(curRec, t, NULL, __LINE__);
 
@@ -4511,7 +4511,7 @@ bool TVRec::GetProgramRingBufferForLiveTV(RecordingInfo **pginfo,
     }
 
     if (!pseudoLiveTVRecording)
-        prog->ApplyRecordRecGroupChange(RecordingInfo::kLiveTVRecGroup);
+        prog->SetRecordingGroup(RecordingInfo::kLiveTVRecGroup);
 
     StartedRecording(prog);
 
-- 
1.9.1

