Ticket #8941: 8941-v1.patch
File 8941-v1.patch, 3.1 KB (added by , 14 years ago) |
---|
-
libs/libmythtv/tv_play.cpp
6390 6390 return; 6391 6391 } 6392 6392 6393 // If we are switching to a channel not on the current recorder 6394 // we need to find the next free recorder with that channel. 6393 uint input_cardid = 0; 6395 6394 QStringList reclist; 6396 if (!channum.isEmpty()) 6395 if (inputid) 6396 { 6397 // If we are switching to a specific input.. 6398 input_cardid = CardUtil::GetCardID(inputid); 6399 if (input_cardid) 6400 reclist.push_back(QString::number(input_cardid)); 6401 } 6402 else if (!channum.isEmpty()) 6403 { 6404 // If we are switching to a channel not on the current recorder 6405 // we need to find the next free recorder with that channel. 6397 6406 reclist = ChannelUtil::GetValidRecorderList(chanid, channum); 6398 else if (inputid) 6407 } 6408 6409 if (!reclist.empty()) 6410 testrec = RemoteRequestFreeRecorderFromList(reclist); 6411 6412 if (testrec && testrec->IsValidRecorder()) 6399 6413 { 6400 uint cardid = CardUtil::GetCardID(inputid);6401 i f (cardid)6402 reclist.push_back(QString::number(cardid));6414 uint cardid = testrec->GetRecorderNumber(); 6415 int cardinputid = (int) inputid; 6416 QString inputname; 6403 6417 6404 // now we need to set our channel as the starting channel.. 6405 if (testrec && testrec->IsValidRecorder()) 6418 // We are switching to a specific input.. 6419 if (inputid) 6420 inputname = CardUtil::GetInputName(inputid); 6421 6422 // We are switching to a specific channel... 6423 if (inputname.isEmpty() && (chanid || !channum.isEmpty())) 6406 6424 { 6407 QString inputname(""); 6408 int cardid = testrec->GetRecorderNumber(); 6409 int cardinputid = CardUtil::GetCardInputID( 6410 cardid, channum, inputname); 6425 cardinputid = CardUtil::GetCardInputID( 6426 cardid, channum, inputname); 6427 } 6411 6428 6412 VERBOSE(VB_CHANNEL, LOC + "Setting startchan: " + 6413 QString("cardid(%1) cardinputid(%2) channum(%3)") 6414 .arg(cardid).arg(cardinputid).arg(channum)); 6415 6416 if (cardid >= 0 && cardinputid >=0 && !inputname.isEmpty()) 6417 { 6429 if (cardid && cardinputid>0 && !inputname.isEmpty()) 6430 { 6431 if (!channum.isEmpty()) 6418 6432 CardUtil::SetStartChannel(cardinputid, channum); 6419 CardUtil::SetStartInput(cardid, inputname); 6420 } 6433 CardUtil::SetStartInput(cardid, inputname); 6421 6434 } 6435 else 6436 { 6437 VERBOSE(VB_IMPORTANT, LOC_WARN + 6438 QString("SwitchCards(%1,'%2',%3)") 6439 .arg(chanid).arg(channum).arg(inputid) + 6440 "\n\t\t\tWe should have been able to set a start " 6441 "channel or input but failed to do so."); 6442 } 6422 6443 } 6423 if (!reclist.empty())6424 testrec = RemoteRequestFreeRecorderFromList(reclist);6425 6444 6426 6445 // If we are just switching recorders find first available recorder. 6427 6446 if (!testrec)