Skip to content

Commit db12303

Browse files
author
Robert McNamara
committed
Fix editing inetref/season/episode from the PBB.
When called from the PBB, the rule editor uses recinfo rather than the rec rule. The RecordingInfo Inetref, Season and Episode were continually being filled into the UI even though changes were being saved. So, if a recorded program had an inetref, and you edited it from the PBB, that value would stubbornly refill the UI even though the rule itself was different. Conversely, calling the editor from one of the other screens like the rule editor would work fine because there was no associated RecordingInfo, and everything was filled in from the RecordingRule. Unconditionally use the database recording rule value to fill in the UI, no matter where the rule editor is invoked from. Fixes #10344.
1 parent 769dfae commit db12303

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

mythtv/programs/mythfrontend/scheduleeditor.cpp

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,16 +1358,28 @@ bool MetadataOptions::Create()
13581358
connect(m_seasonSpin, SIGNAL(itemSelected(MythUIButtonListItem*)),
13591359
SLOT(ValuesChanged()));
13601360

1361-
// InetRef
1362-
m_inetrefEdit->SetText(m_recordingRule->m_inetref);
1363-
1364-
// Season
13651361
m_seasonSpin->SetRange(0,9999,1,1);
1366-
m_seasonSpin->SetValue(m_recordingRule->m_season);
1367-
1368-
// Episode
13691362
m_episodeSpin->SetRange(0,9999,1,1);
1370-
m_episodeSpin->SetValue(m_recordingRule->m_episode);
1363+
1364+
// InetRef/Seas/Ep (needs to be built from original rule, not pginfo)
1365+
if (m_recInfo)
1366+
{
1367+
RecordingRule *rule = new RecordingRule();
1368+
rule->m_recordID = m_recInfo->GetRecordingRuleID();
1369+
rule->Load();
1370+
m_inetrefEdit->SetText(rule->m_inetref);
1371+
m_seasonSpin->SetValue(rule->m_season);
1372+
m_episodeSpin->SetValue(rule->m_episode);
1373+
1374+
delete rule;
1375+
rule = NULL;
1376+
}
1377+
else
1378+
{
1379+
m_inetrefEdit->SetText(m_recordingRule->m_inetref);
1380+
m_seasonSpin->SetValue(m_recordingRule->m_season);
1381+
m_episodeSpin->SetValue(m_recordingRule->m_episode);
1382+
}
13711383

13721384
if (m_coverart)
13731385
{

0 commit comments

Comments
 (0)