Skip to content
Browse files

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.
  • Loading branch information...
1 parent 20adee5 commit 6c2276fe0ad4680926602895e97e330525cfe74b @gigem gigem committed Jan 23, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 mythtv/libs/libmythtv/recordinginfo.cpp
View
7 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)

0 comments on commit 6c2276f

Please sign in to comment.
Something went wrong with that request. Please try again.