summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Engel <dengel@mythtv.org>2012-01-23 17:52:32 (GMT)
committer David Engel <dengel@mythtv.org>2012-01-23 17:57:08 (GMT)
commit6c2276fe0ad4680926602895e97e330525cfe74b (patch)
treeee89870e64c8b2fa3645d4b9c3a5657a3f0d2b2b
parent20adee5bf5c714302d20ac053d41593f73c6569a (diff)
Fix "Clear Override" to not create invalid rules.
Fix RecordingInfo::ApplyRecordStateChange() to delete the underlying rule instead of saving it when the new type is kNotRecording. Previously, this would result in an invalid rule with type 0.
-rw-r--r--mythtv/libs/libmythtv/recordinginfo.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
index 094a228..b51655b 100644
--- a/mythtv/libs/libmythtv/recordinginfo.cpp
+++ b/mythtv/libs/libmythtv/recordinginfo.cpp
@@ -531,7 +531,12 @@ void RecordingInfo::ApplyRecordStateChange(RecordingType newstate, bool save)
record->m_type = newstate;
if (save)
- record->Save();
+ {
+ if (newstate == kNotRecording)
+ record->Delete();
+ else
+ record->Save();
+ }
}
/** \fn RecordingInfo::ApplyRecordRecPriorityChange(int)