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:
parent
fb9c1c6a44
commit
c8497e1fce
4
HISTORY
4
HISTORY
@ -64,3 +64,7 @@ VDR Plugin 'satip' Revision History
|
|||||||
|
|
||||||
- Added a validity check for the session member.
|
- Added a validity check for the session member.
|
||||||
- Added a session id quirk for Triax TSS 400.
|
- Added a session id quirk for Triax TSS 400.
|
||||||
|
|
||||||
|
2014-xx-xx: Version 0.3.4
|
||||||
|
|
||||||
|
- Fixed the cable only device detection.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
||||||
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
||||||
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
||||||
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
"POT-Creation-Date: 2014-05-18 05:18+0200\n"
|
||||||
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
"PO-Revision-Date: 2014-05-18 05:18+0200\n"
|
||||||
|
2
satip.c
2
satip.c
@ -25,7 +25,7 @@
|
|||||||
#define GITVERSION ""
|
#define GITVERSION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char VERSION[] = "0.3.3" GITVERSION;
|
const char VERSION[] = "0.3.4" GITVERSION;
|
||||||
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
||||||
|
|
||||||
class cPluginSatip : public cPlugin {
|
class cPluginSatip : public cPlugin {
|
||||||
|
12
server.c
12
server.c
@ -51,8 +51,10 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
|
|||||||
else
|
else
|
||||||
modelCountM[eSatipModuleDVBT2] = 1;
|
modelCountM[eSatipModuleDVBT2] = 1;
|
||||||
// Add model quirks here
|
// Add model quirks here
|
||||||
if (!isempty(*descriptionM) && strstr(*descriptionM, "OctopusNet"))
|
if (!isempty(*descriptionM) && strstr(*descriptionM, "OctopusNet")) {
|
||||||
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
|
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
|
||||||
|
modelCountM[eSatipModuleDVBC] = modelCountM[eSatipModuleDVBT2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (strstr(r, "DVBT")) {
|
if (strstr(r, "DVBT")) {
|
||||||
modelTypeM |= cSatipServer::eSatipModelTypeDVBT;
|
modelTypeM |= cSatipServer::eSatipModelTypeDVBT;
|
||||||
@ -63,6 +65,14 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
|
|||||||
// Add model quirks here
|
// Add model quirks here
|
||||||
if (!isempty(*descriptionM) && strstr(*descriptionM, "OctopusNet"))
|
if (!isempty(*descriptionM) && strstr(*descriptionM, "OctopusNet"))
|
||||||
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
|
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);
|
r = strtok_r(NULL, ",", &s);
|
||||||
}
|
}
|
||||||
|
3
server.h
3
server.h
@ -16,6 +16,7 @@ private:
|
|||||||
eSatipModuleDVBS2 = 0,
|
eSatipModuleDVBS2 = 0,
|
||||||
eSatipModuleDVBT,
|
eSatipModuleDVBT,
|
||||||
eSatipModuleDVBT2,
|
eSatipModuleDVBT2,
|
||||||
|
eSatipModuleDVBC,
|
||||||
eSatipModuleCount
|
eSatipModuleCount
|
||||||
};
|
};
|
||||||
cString addressM;
|
cString addressM;
|
||||||
@ -53,7 +54,7 @@ public:
|
|||||||
bool Quirk(int quirkP) { return ((quirkP & eSatipQuirkMask) & quirkM); }
|
bool Quirk(int quirkP) { return ((quirkP & eSatipQuirkMask) & quirkM); }
|
||||||
int ModelType(void) { return modelTypeM; }
|
int ModelType(void) { return modelTypeM; }
|
||||||
bool Match(int modelP) { return ((modelP & eSatipModelTypeMask) & 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 Satellite() { return Match(eSatipModelTypeDVBS2) ? modelCountM[eSatipModuleDVBS2] : 0; }
|
||||||
int Terrestrial() { return Match(eSatipModelTypeDVBT) ? modelCountM[eSatipModuleDVBT] : 0; }
|
int Terrestrial() { return Match(eSatipModelTypeDVBT) ? modelCountM[eSatipModuleDVBT] : 0; }
|
||||||
int Terrestrial2() { return Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : 0; }
|
int Terrestrial2() { return Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user