Skip to content

Commit

Permalink
Revert tuner count fix for .24.
Browse files Browse the repository at this point in the history
Looks like libhdhomerun in .24-fixes isn't new enough to support this.  Bummer.
  • Loading branch information
Robert McNamara committed Jun 19, 2011
1 parent 6fca6fa commit ef79f36
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
10 changes: 4 additions & 6 deletions mythtv/libs/libmythtv/cardutil.cpp
Expand Up @@ -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");
Expand All @@ -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
Expand Down
17 changes: 12 additions & 5 deletions mythtv/libs/libmythtv/videosource.cpp
Expand Up @@ -1337,14 +1337,16 @@ HDHomeRunTunerIndex::HDHomeRunTunerIndex()
{
setLabel(QObject::tr("Tuner"));
setEnabled(false);
addSelection("0");
addSelection("1");
connect(this, SIGNAL(valueChanged( const QString&)),
this, SLOT( UpdateDevices(const QString&)));
_oldValue = "";
};

void HDHomeRunTunerIndex::setEnabled(bool e)
{
TransLineEditSetting::setEnabled(e);
TransComboBoxSetting::setEnabled(e);
if (e) {
if (!_oldValue.isEmpty())
setValue(_oldValue);
Expand Down Expand Up @@ -1694,17 +1696,22 @@ 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;
tmpdevice.desc = CardUtil::GetHDHRdesc(devid);
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;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videosource.h
Expand Up @@ -823,7 +823,7 @@ class HDHomeRunIP : public TransLineEditSetting
QString _oldValue;
};

class HDHomeRunTunerIndex : public TransLineEditSetting
class HDHomeRunTunerIndex : public TransComboBoxSetting
{
Q_OBJECT

Expand Down

0 comments on commit ef79f36

Please sign in to comment.