Ticket #6066: patch.diff
File patch.diff, 3.9 KB (added by , 14 years ago) |
---|
-
mythtv-0-23/mythtv/programs/mythbackend/scheduler.cpp
2054 2054 for ( ; idleIter != reclist.end(); idleIter++) 2055 2055 if ((*idleIter)->recstatus == rsWillRecord) 2056 2056 break; 2057 2057 2058 2058 if (idleIter != reclist.end()) 2059 2059 { 2060 2060 if (curtime.secsTo((*idleIter)->recstartts) - 2061 prerollseconds > idleWaitForRecordingTime * 60) 2061 prerollseconds > 2062 (idleWaitForRecordingTime * 60) + 2063 idleTimeoutSecs) 2062 2064 { 2063 2065 idleSince = curtime; 2064 2066 } … … 2096 2098 { 2097 2099 int itime = idleSince.secsTo(curtime); 2098 2100 QString msg; 2101 2099 2102 if (itime == 1) 2100 2103 { 2101 2104 msg = QString("I\'m idle now... shutdown will " -
mythtv-0-23/mythtv/programs/mythwelcome/welcomedialog.h
72 72 QDateTime m_nextRecordingStart; 73 73 int m_preRollSeconds; 74 74 int m_idleWaitForRecordingTime; 75 int m_idleTimeoutSecs; 75 76 uint m_screenTunerNo; 76 77 uint m_screenScheduledNo; 77 78 uint m_statusListNo; -
mythtv-0-23/mythtv/programs/mythwelcome/welcomedialog.cpp
37 37 m_secondsToShutdown(-1), m_preRollSeconds(0), m_idleWaitForRecordingTime(0), 38 38 m_screenTunerNo(0), m_screenScheduledNo(0), m_statusListNo(0), 39 39 m_frontendIsRunning(false),m_pendingRecListUpdate(false), 40 m_pendingSchedUpdate(false) 40 m_pendingSchedUpdate(false), m_idleTimeoutSecs(0) 41 41 { 42 42 gContext->addListener(this); 43 43 … … 52 52 53 53 // if idleTimeoutSecs is 0, the user disabled the auto-shutdown feature 54 54 m_bWillShutdown = (gContext->GetNumSetting("idleTimeoutSecs", 0) != 0); 55 56 m_idleTimeoutSecs = gContext->GetNumSetting("idleTimeoutSecs", 0); 55 57 56 58 connect(m_updateStatusTimer, SIGNAL(timeout()), 57 59 this, SLOT(updateStatus())); … … 517 519 QDateTime curtime = QDateTime::currentDateTime(); 518 520 519 521 if (!m_isRecording && !m_nextRecordingStart.isNull() && 520 curtime.secsTo(m_nextRecordingStart) -521 m_preRollSeconds < m_idleWaitForRecordingTime * 60)522 curtime.secsTo(m_nextRecordingStart) - m_preRollSeconds < 523 (m_idleWaitForRecordingTime * 60) + m_idleTimeoutSecs) 522 524 { 523 525 m_statusList.append(tr("MythTV is about to start recording.")); 524 526 } … … 664 666 665 667 // don't shutdown if we are about to start recording 666 668 if (!m_nextRecordingStart.isNull() && 667 curtime.secsTo(m_nextRecordingStart) -668 m_preRollSeconds < m_idleWaitForRecordingTime * 60)669 curtime.secsTo(m_nextRecordingStart) - m_preRollSeconds < 670 (m_idleWaitForRecordingTime * 60) + m_idleTimeoutSecs) 669 671 { 670 672 MythPopupBox::showOkPopup(gContext->GetMainWindow(), "Cannot shutdown", 671 673 tr("Cannot shutdown because MythTV is about to start recording"));