diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp
index 2c9ca74..c122f7f 100644
|
a
|
b
|
QString CardUtil::GetDeviceLabel(const QString &cardtype, |
| 1734 | 1734 | return QString("[ %1 : %2 ]").arg(cardtype).arg(videodevice); |
| 1735 | 1735 | } |
| 1736 | 1736 | |
| | 1737 | QString CardUtil::GetDeviceLabel(uint cardid) |
| | 1738 | { |
| | 1739 | QString devlabel; |
| | 1740 | MSqlQuery query(MSqlQuery::InitCon()); |
| | 1741 | query.prepare("SELECT cardtype, videodevice " |
| | 1742 | "FROM capturecard WHERE cardid = :CARDID " |
| | 1743 | "ORDER BY cardid"); |
| | 1744 | query.bindValue(":CARDID", cardid); |
| | 1745 | |
| | 1746 | if (query.exec() && query.next()) |
| | 1747 | { |
| | 1748 | return( GetDeviceLabel( query.value(0).toString(), |
| | 1749 | query.value(1).toString()) ); |
| | 1750 | } |
| | 1751 | |
| | 1752 | return( "[ UNKNOWN ]" ); |
| | 1753 | } |
| | 1754 | |
| 1737 | 1755 | void CardUtil::GetCardInputs( |
| 1738 | 1756 | uint cardid, |
| 1739 | 1757 | const QString &device, |
diff --git a/mythtv/libs/libmythtv/cardutil.h b/mythtv/libs/libmythtv/cardutil.h
index 3cb636e..8bbfcbd 100644
|
a
|
b
|
class MPUBLIC CardUtil |
| 226 | 226 | |
| 227 | 227 | static QString GetDeviceLabel(const QString &cardtype, |
| 228 | 228 | const QString &videodevice); |
| | 229 | static QString GetDeviceLabel(uint cardid); |
| 229 | 230 | |
| 230 | 231 | static QString ProbeSubTypeName(uint cardid); |
| 231 | 232 | |
diff --git a/mythtv/programs/mythbackend/httpstatus.cpp b/mythtv/programs/mythbackend/httpstatus.cpp
index 1b37d2c..97803f1 100644
|
a
|
b
|
|
| 35 | 35 | #include "encoderlink.h" |
| 36 | 36 | #include "scheduler.h" |
| 37 | 37 | #include "mainserver.h" |
| | 38 | #include "cardutil.h" |
| 38 | 39 | |
| 39 | 40 | ///////////////////////////////////////////////////////////////////////////// |
| 40 | 41 | // |
| … |
… |
void HttpStatus::FillStatusXML( QDomDocument *pDoc ) |
| 200 | 201 | else |
| 201 | 202 | encoder.setAttribute("hostname", elink->GetHostName()); |
| 202 | 203 | |
| | 204 | encoder.setAttribute("devlabel", |
| | 205 | CardUtil::GetDeviceLabel(elink->GetCardID()) ); |
| | 206 | |
| 203 | 207 | if (elink->IsConnected()) |
| 204 | 208 | numencoders++; |
| 205 | 209 | |
| … |
… |
int HttpStatus::PrintEncoderStatus( QTextStream &os, QDomElement encoders ) |
| 708 | 712 | |
| 709 | 713 | bool bIsLowOnFreeSpace=e.attribute( "lowOnFreeSpace", "0").toInt(); |
| 710 | 714 | |
| 711 | | os << " Encoder " << sCardId << " is " << sIsLocal |
| 712 | | << " on " << sHostName; |
| | 715 | QString sDevlabel = e.attribute( "devlabel", "[ UNKNOWN ]"); |
| | 716 | |
| | 717 | os << " Encoder " << sCardId << " " << sDevlabel |
| | 718 | << " is " << sIsLocal << " on " << sHostName; |
| 713 | 719 | |
| 714 | 720 | if ((sIsLocal == "remote") && !bConnected) |
| 715 | 721 | { |