Ticket #2930: tuner_busy.diff
File tuner_busy.diff, 4.9 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/remoteutil.h
63 63 MPUBLIC int RemoteCheckForRecording(ProgramInfo *pginfo); 64 64 MPUBLIC int RemoteGetRecordingStatus(ProgramInfo *pginfo, int overrecsecs, 65 65 int underrecsecs); 66 66 MPUBLIC vector<ProgramInfo *> *RemoteGetCurrentlyRecordingList(void); 67 67 #endif 68 68 69 69 /* vim: set expandtab tabstop=4 shiftwidth=4: */ -
libs/libmythtv/tv_play.cpp
103 103 104 104 while (!quitAll) 105 105 { 106 int freeRecorders = RemoteGetFreeRecorderCount(); 106 107 if (curProgram) 107 108 { 108 109 if (!tv->Playback(curProgram)) 109 110 quitAll = true; 110 111 } 112 else if (!freeRecorders) 113 { 114 vector<ProgramInfo *> *reclist; 115 reclist = RemoteGetCurrentlyRecordingList(); 116 if (reclist->empty()) 117 { 118 VERBOSE(VB_PLAYBACK, LOC_ERR + 119 "Failed to get recording show list"); 120 quitAll = true; 121 } 122 123 int numrecordings = reclist->size(); 124 if (numrecordings > 0) 125 { 126 if (numrecordings == 1) 127 { 128 curProgram = new ProgramInfo(*reclist->at(0)); 129 } 130 else 131 { 132 ProgramInfo *p = NULL; 133 QStringList recTitles; 134 QString buttonTitle; 135 vector<ProgramInfo *>::iterator it = reclist->begin(); 136 while (it != reclist->end()) 137 { 138 p = *it; 139 buttonTitle = tr("Chan %1: %2") 140 .arg(p->chanstr).arg(p->title); 141 recTitles.append(buttonTitle); 142 it++; 143 } 144 int ret = MythPopupBox::showButtonPopup( 145 gContext->GetMainWindow(), 146 "", 147 tr("All Tuners are Busy.\n" 148 "Select a Current Recording"), 149 recTitles, 1); 150 if (ret == -1) 151 { 152 quitAll = true; 153 } 154 else 155 { 156 p = reclist->at(ret); 157 curProgram = new ProgramInfo(*p); 158 } 159 } 160 } 161 162 if (reclist) 163 delete reclist; 164 continue; 165 } 111 166 else 112 167 { 113 168 if (!tv->LiveTV(showDialogs, startInGuide)) -
libs/libmythtv/remoteutil.cpp
426 426 return retval; 427 427 } 428 428 429 /* 430 * \brief return list of currently recording shows 431 */ 432 vector<ProgramInfo *> *RemoteGetCurrentlyRecordingList(void) 433 { 434 QString str = "QUERY_RECORDINGS "; 435 str += "Recording"; 436 QStringList strlist = str; 437 438 vector<ProgramInfo *> *reclist = new vector<ProgramInfo *>; 439 vector<ProgramInfo *> *info = new vector<ProgramInfo *>; 440 if (!RemoteGetRecordingList(info, strlist)) 441 { 442 if (info) 443 delete info; 444 return reclist; 445 } 446 447 ProgramInfo *p = NULL; 448 vector<ProgramInfo *>::iterator it = info->begin(); 449 // make sure whatever remotegetrecordinglist returned 450 // only has rsRecording shows 451 for ( ; it != info->end(); it++) 452 { 453 p = *it; 454 if (p->recstatus == rsRecording) 455 reclist->push_back(new ProgramInfo(*p)); 456 } 457 458 if (info) 459 delete info; 460 461 return reclist; 462 } 429 463 /* vim: set expandtab tabstop=4 shiftwidth=4: */ -
programs/mythbackend/mainserver.cpp
1099 1099 " recorded.starttime = recordedprogram.starttime ) " 1100 1100 "WHERE ( recorded.deletepending = 0 OR " 1101 1101 " DATE_ADD(recorded.lastmodified, INTERVAL 5 MINUTE) <= NOW() " 1102 " ) " 1103 "ORDER BY recorded.starttime"; 1102 " ) "; 1104 1103 1104 if (type == "Recording") 1105 thequery += "AND recorded.endtime >= NOW() AND " 1106 "recorded.starttime <= NOW()"; 1107 1108 thequery += "ORDER BY recorded.starttime"; 1109 1105 1110 if (type == "Delete") 1106 1111 thequery += " DESC"; 1107 1112