Skip to content

Commit

Permalink
Fix "Clear Override" to not create invalid rules.
Browse files Browse the repository at this point in the history
Cherry-picked from master commit 6c2276f.

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
gigem committed Jan 23, 2012
1 parent 54c4d39 commit e4660d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mythtv/libs/libmythtv/recordinginfo.cpp
Expand Up @@ -518,7 +518,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)
Expand Down

0 comments on commit e4660d6

Please sign in to comment.