Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 0 additions & 119 deletions AutoBouquetsMaker/custom/hd_sat_192_sky_deutschland_CustomLCN.xml

This file was deleted.

54 changes: 54 additions & 0 deletions AutoBouquetsMaker/lib/dvbreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,59 @@ PyObject *ss_read_fastscan(PyObject *self, PyObject *args) {
return ret;
}

// Sky Deutschland / Sky Q channel-list carousel (table 0x9E, variable_id 0x0055 on PID 0x08AE).
// One section carries a raw chunk of a larger NDS-ARCHIVE blob; the Python layer reassembles
// all sections of the same version_number and parses the archive.
PyObject *ss_parse_header_skyq(unsigned char *data, int length)
{
return Py_BuildValue("{s:i,s:i,s:i,s:i,s:i,s:i,s:i}",
"table_id", data[0],
"section_length", length,
"variable_id", (data[3] << 8) | data[4],
"version_number", (data[5] >> 1) & 0x1F,
"current_next_indicator", data[5] & 0x01,
"section_number", data[6],
"last_section_number", data[7]);
}

PyObject *ss_read_skyq(PyObject *self, PyObject *args) {
PyObject *content = NULL, *header = NULL;
unsigned char buffer[4096], table_id;
int fd;

if (!PyArg_ParseTuple(args, "ib", &fd, &table_id))
return Py_None;

int size = read(fd, buffer, sizeof(buffer));
if (size < 14)
return Py_None;

if (buffer[0] != table_id)
return Py_None;

int section_length = ((buffer[1] & 0x0f) << 8) | buffer[2];

if (size != section_length + 3)
return Py_None;

// payload: bytes 13..section_length-2 inclusive (excludes 8-byte section header,
// 5-byte NDS sub-header and trailing 4-byte CRC32)
int payload_len = section_length - 14;
if (payload_len < 0)
return Py_None;

header = ss_parse_header_skyq(buffer, section_length);
content = PyBytes_FromStringAndSize((const char *)(buffer + 13), payload_len);

if (!header || !content)
return Py_None;

PyObject *ret = Py_BuildValue("{s:O,s:O}", "header", header, "content", content);
Py_DECREF(header);
Py_DECREF(content);
return ret;
}

PyObject *ss_read_nit(PyObject *self, PyObject *args) {
PyObject *content = NULL, *header = NULL;
unsigned char buffer[4096], table_id_current, table_id_other;
Expand Down Expand Up @@ -1419,6 +1472,7 @@ static PyMethodDef dvbreaderMethods[] = {
{ "read_nit", ss_read_nit, METH_VARARGS },
{ "read_sdt", ss_read_sdt, METH_VARARGS },
{ "read_fastscan", ss_read_fastscan, METH_VARARGS },
{ "read_skyq", ss_read_skyq, METH_VARARGS },
{ "read_ts", ss_read_ts, METH_VARARGS },
{ NULL, NULL }
};
Expand Down
4 changes: 2 additions & 2 deletions AutoBouquetsMaker/providers/sat_130_ncplus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
frequency="10719000"
symbol_rate="27500000"
polarization="1"
fec_inner="5"
fec_inner="4"
inversion="2"
system="1"
modulation="2"
Expand All @@ -21,7 +21,7 @@
<section number="1">CANAL+</section>
</sections>
<dvbsconfigs>
<configuration key="sd_02020" bouquet="0x2020" region="0x83">NC+</configuration>
<configuration key="sd_02020" bouquet="0x2020" region="0x83">CANAL+</configuration>
<!--configuration key="sd_02021" bouquet="0x2021" region="0x83">2021</configuration-->
<!--configuration key="sd_02022" bouquet="0x2022" region="0x83">2022</configuration-->
<!--configuration key="sd_0C022" bouquet="0xC022" region="0x83">C023</configuration-->
Expand Down
21 changes: 20 additions & 1 deletion AutoBouquetsMaker/providers/sat_192_sky_deutschland.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<provider>
<name>Sky Deutschland</name>
<streamtype>dvbs</streamtype>
<protocol>nolcn</protocol>
<protocol>skyde</protocol>
<transponder
orbital_position="192"
frequency="12031500"
Expand All @@ -15,7 +15,20 @@
pilot="2"
tsid="4"
onid="133"
skyq_pid="0x08ae"
skyq_table_id="0x9e"
skyq_variable_id="0x0055"
/>
<dvbsconfigs>
<configuration key="sat_hd" bouquet="0x4" region="0x0" bouquet_file="Q-skyHDTVchannels-4.txt">Satellit HD</configuration>
</dvbsconfigs>
<!-- Services Sky broadcasts but does not list in the current carousel file.
Entries here are applied only when the carousel has no LCN for the
same (ONID, TSID, SID). Remove an entry once Sky restores it. -->
<lcn_overrides>
<override onid="0x85" tsid="0x0b" sid="0x8e" lcn="100">Sky Showcase HD</override>
<override onid="0x85" tsid="0x0b" sid="0x71" lcn="122">HISTORY Channel HD</override>
</lcn_overrides>
<sections>
<section number="100">Entertainment</section>
<section number="200">Sport</section>
Expand All @@ -41,6 +54,12 @@ for number in service["numbers"]:
if service["service_name"] in blacklist:
skip.skip = True

# Sky DE sometimes wraps service names in DVB emphasis bytes (0x86/0x87),
# which defeats startswith() — use a substring check so we catch e.g.
# "†STEST1‡" too.
if "STEST" in service["service_name"]:
skip.skip = True

]]>
</servicehacks>
</provider>
Loading
Loading