1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Fixed the cable only device detection.

This commit is contained in:
Rolf Ahrenberg 2014-10-30 22:10:09 +02:00
parent fb9c1c6a44
commit c8497e1fce
8 changed files with 22 additions and 7 deletions

View File

@ -64,3 +64,7 @@ VDR Plugin 'satip' Revision History
- Added a validity check for the session member.
- Added a session id quirk for Triax TSS 400.
2014-xx-xx: Version 0.3.4
- Fixed the cable only device detection.

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.3\n"
"Project-Id-Version: vdr-satip 0.3.4\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
"PO-Revision-Date: 2014-05-18 05:18+0200\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.3\n"
"Project-Id-Version: vdr-satip 0.3.4\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
"PO-Revision-Date: 2014-05-18 05:18+0200\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.3\n"
"Project-Id-Version: vdr-satip 0.3.4\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
"PO-Revision-Date: 2014-05-18 05:18+0200\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.3\n"
"Project-Id-Version: vdr-satip 0.3.4\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
"PO-Revision-Date: 2014-05-18 05:18+0200\n"

View File

@ -25,7 +25,7 @@
#define GITVERSION ""
#endif
const char VERSION[] = "0.3.3" GITVERSION;
const char VERSION[] = "0.3.4" GITVERSION;
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
class cPluginSatip : public cPlugin {

View File

@ -51,8 +51,10 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
else
modelCountM[eSatipModuleDVBT2] = 1;
// Add model quirks here
if (!isempty(*descriptionM) && strstr(*descriptionM, "OctopusNet"))
if (!isempty(*descriptionM) && strstr(*descriptionM, "OctopusNet")) {
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
modelCountM[eSatipModuleDVBC] = modelCountM[eSatipModuleDVBT2];
}
}
if (strstr(r, "DVBT")) {
modelTypeM |= cSatipServer::eSatipModelTypeDVBT;
@ -63,6 +65,14 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
// Add model quirks here
if (!isempty(*descriptionM) && strstr(*descriptionM, "OctopusNet"))
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
modelCountM[eSatipModuleDVBC] = modelCountM[eSatipModuleDVBT];
}
if (strstr(r, "DVBC")) {
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
if (char *c = strstr(r, "-"))
modelCountM[eSatipModuleDVBC] = atoi(++c);
else
modelCountM[eSatipModuleDVBC] = 1;
}
r = strtok_r(NULL, ",", &s);
}

View File

@ -16,6 +16,7 @@ private:
eSatipModuleDVBS2 = 0,
eSatipModuleDVBT,
eSatipModuleDVBT2,
eSatipModuleDVBC,
eSatipModuleCount
};
cString addressM;
@ -53,7 +54,7 @@ public:
bool Quirk(int quirkP) { return ((quirkP & eSatipQuirkMask) & quirkM); }
int ModelType(void) { return modelTypeM; }
bool Match(int modelP) { return ((modelP & eSatipModelTypeMask) & modelTypeM); }
int Cable() { return Match(eSatipModelTypeDVBC) ? (Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : modelCountM[eSatipModuleDVBT]) : 0; } // an ugly hack
int Cable() { return Match(eSatipModelTypeDVBC) ? modelCountM[eSatipModuleDVBC] : 0; }
int Satellite() { return Match(eSatipModelTypeDVBS2) ? modelCountM[eSatipModuleDVBS2] : 0; }
int Terrestrial() { return Match(eSatipModelTypeDVBT) ? modelCountM[eSatipModuleDVBT] : 0; }
int Terrestrial2() { return Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : 0; }