[mythtv-users] Mythweb: Force recording on specific encoder?
Bruce Markey
bjm at lvcm.com
Wed Nov 15 22:10:53 UTC 2006
Chris Petersen wrote:
> Mark Paulus wrote:
>> I have 2 BEs, with several cards, including 1 or 2 cards that I may be
>> experimenting with at any time. I see that in mythfrontend, there is
>> the option to select the "preferred encoder". Would it be possible to
>> get that same selection dropdown available in the mythweb interface, for
>> such an occasion?
>
> I just found out about this feature 2 nights ago, and it's high on my
> list. It'll probably go in tonight.
Great. It never crossed my mind that this needed to be added
for mythweb (doh). The trick is to provide a user readable
list of input names. I used the same convention as the OSD
messages when you change inputs; use the cardinput.displayname
if present else <cardid>: <inputname> .
Here's the code from libs/libmythtv/sr_items.cpp in case
it helps:
void SRInput::fillSelections()
{
addSelection(QString(QObject::tr("Use any available input")), 0);
MSqlQuery query(MSqlQuery::InitCon());
query.prepare("SELECT cardinputid,cardid,inputname,displayname "
"FROM cardinput ORDER BY cardinputid");
if (query.exec() && query.isActive() && query.size() > 0)
{
while (query.next())
{
QString input_name = query.value(3).toString();
if (input_name == "")
input_name = QString("%1: %2")
.arg(query.value(1).toInt())
.arg(query.value(2).toString());
addSelection(QObject::tr("Prefer input %1")
.arg(input_name), query.value(0).toInt());
}
}
}
Once the selection is made, the 'cardinput.cardinputid' int
for the selected input should be written into 'record.prefinput'
for the selected rule.
-- bjm
More information about the mythtv-users
mailing list