summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert McNamara <rmcnamara@mythtv.org>2011-06-19 19:10:15 (GMT)
committer Robert McNamara <rmcnamara@mythtv.org>2011-06-19 19:10:15 (GMT)
commitef79f360d1f326e10c60415a553e3f3695754dcc (patch)
tree070f275874b4345669068d2935cbfb7281307165
parent6fca6fa5258df2452c84f13e2bc58871dd4d99ed (diff)
Revert tuner count fix for .24.
Looks like libhdhomerun in .24-fixes isn't new enough to support this. Bummer.
-rw-r--r--mythtv/libs/libmythtv/cardutil.cpp10
-rw-r--r--mythtv/libs/libmythtv/videosource.cpp17
-rw-r--r--mythtv/libs/libmythtv/videosource.h2
3 files changed, 17 insertions, 12 deletions
diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp
index ed0a562..5e15947 100644
--- a/mythtv/libs/libmythtv/cardutil.cpp
+++ b/mythtv/libs/libmythtv/cardutil.cpp
@@ -234,7 +234,7 @@ QStringList CardUtil::ProbeVideoDevices(const QString &rawtype)
return devs;
}
- if (result >= max_count)
+ if (result == 50)
{
VERBOSE(VB_IMPORTANT, "CardUtil::ProbeVideoDevices: "
"Warning: may be > 50 HDHomerun devices");
@@ -250,11 +250,9 @@ QStringList CardUtil::ProbeVideoDevices(const QString &rawtype)
.arg((result_list[i].ip_addr>> 8) & 0xFF)
.arg((result_list[i].ip_addr>> 0) & 0xFF);
- for (int tuner = 0; tuner < result_list[i].tuner_count; tuner++)
- {
- QString hdhrdev = id.toUpper() + " " + ip + " " + QString("%1").arg(tuner);
- devs.push_back(hdhrdev);
- }
+ QString hdhrdev = id.toUpper() + " " + ip;
+
+ devs.push_back(hdhrdev);
}
}
#endif // USING_HDHOMERUN
diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp
index 423d299..5d7a508 100644
--- a/mythtv/libs/libmythtv/videosource.cpp
+++ b/mythtv/libs/libmythtv/videosource.cpp
@@ -1337,6 +1337,8 @@ HDHomeRunTunerIndex::HDHomeRunTunerIndex()
{
setLabel(QObject::tr("Tuner"));
setEnabled(false);
+ addSelection("0");
+ addSelection("1");
connect(this, SIGNAL(valueChanged( const QString&)),
this, SLOT( UpdateDevices(const QString&)));
_oldValue = "";
@@ -1344,7 +1346,7 @@ HDHomeRunTunerIndex::HDHomeRunTunerIndex()
void HDHomeRunTunerIndex::setEnabled(bool e)
{
- TransLineEditSetting::setEnabled(e);
+ TransComboBoxSetting::setEnabled(e);
if (e) {
if (!_oldValue.isEmpty())
setValue(_oldValue);
@@ -1694,9 +1696,8 @@ void HDHomeRunConfigurationGroup::FillDeviceList(void)
{
QString dev = *it;
QStringList devinfo = dev.split(" ");
- QString devid = devinfo.at(0);
- QString devip = devinfo.at(1);
- QString devtuner = devinfo.at(2);
+ QString devid = devinfo.first();
+ QString devip = devinfo.last();
HDHomeRunDevice tmpdevice;
tmpdevice.deviceid = devid;
@@ -1704,7 +1705,13 @@ void HDHomeRunConfigurationGroup::FillDeviceList(void)
tmpdevice.cardip = devip;
tmpdevice.inuse = false;
tmpdevice.discovered = true;
- tmpdevice.cardtuner = devtuner;
+
+ tmpdevice.cardtuner = "0";
+ tmpdevice.mythdeviceid =
+ tmpdevice.deviceid + "-" + tmpdevice.cardtuner;
+ devicelist[tmpdevice.mythdeviceid] = tmpdevice;
+
+ tmpdevice.cardtuner = "1";
tmpdevice.mythdeviceid =
tmpdevice.deviceid + "-" + tmpdevice.cardtuner;
devicelist[tmpdevice.mythdeviceid] = tmpdevice;
diff --git a/mythtv/libs/libmythtv/videosource.h b/mythtv/libs/libmythtv/videosource.h
index 5edd19e..ffaba5f 100644
--- a/mythtv/libs/libmythtv/videosource.h
+++ b/mythtv/libs/libmythtv/videosource.h
@@ -823,7 +823,7 @@ class HDHomeRunIP : public TransLineEditSetting
QString _oldValue;
};
-class HDHomeRunTunerIndex : public TransLineEditSetting
+class HDHomeRunTunerIndex : public TransComboBoxSetting
{
Q_OBJECT