Skip to content

Commit

Permalink
Add a setting to control MHEG interaction channel, patch by Lawrence …
Browse files Browse the repository at this point in the history
…Rust

This also disables the interaction channel (and iplayer) by default as
it appears that this is currently broken, possibly by an upstream
change at the BBC.
  • Loading branch information
stuartm committed Sep 7, 2013
1 parent 19f2d50 commit 03c11f4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mythtv/libs/libmythtv/mhegic.cpp
Expand Up @@ -18,6 +18,7 @@ using std::getenv;
// Myth
#include "netstream.h"
#include "mythlogging.h"
#include "mythcorecontext.h"

#define LOC QString("[mhegic] ")

Expand Down Expand Up @@ -48,14 +49,16 @@ MHInteractionChannel::EStatus MHInteractionChannel::status()
return kInactive;
}

// TODO get this from mythdb
if (!gCoreContext->GetNumSetting("EnableMHEG", 0))
return kDisabled;

QStringList opts = QString(getenv("MYTHMHEG")).split(':');
if (opts.contains("noice", Qt::CaseInsensitive))
return kDisabled;
else if (opts.contains("ice", Qt::CaseInsensitive))
return kActive;
else // Default
return kActive;

return gCoreContext->GetNumSetting("EnableMHEGic", 1) ? kActive : kDisabled;
}

static inline bool isCached(const QString& csPath)
Expand Down
13 changes: 13 additions & 0 deletions mythtv/programs/mythfrontend/globalsettings.cpp
Expand Up @@ -1592,6 +1592,18 @@ static HostCheckBox *EnableMHEG()
return gc;
}

static HostCheckBox *EnableMHEGic()
{
HostCheckBox *gc = new HostCheckBox("EnableMHEGic");
gc->setLabel(QObject::tr("Enable network access for interactive TV"));
gc->setValue(false);
gc->setHelpText(QObject::tr(
"If enabled, interactive TV applications (MHEG) will "
"be able to access interactive content over the "
"internet. This is used for BBC iPlayer."));
return gc;
}

static HostCheckBox *PersistentBrowseMode()
{
HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode");
Expand Down Expand Up @@ -4025,6 +4037,7 @@ OSDSettings::OSDSettings()
osd->setLabel(tr("On-screen Display"));

osd->addChild(EnableMHEG());
osd->addChild(EnableMHEGic());
osd->addChild(PersistentBrowseMode());
osd->addChild(BrowseAllTuners());
osd->addChild(DefaultCCMode());
Expand Down

0 comments on commit 03c11f4

Please sign in to comment.