mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-03-05 12:01:45 +01:00
write bouquet fix
This commit is contained in:
@@ -61,7 +61,7 @@ SYSTEM = {"0": "DVB-S", "1": "DVB-S2"}
|
||||
MODULATION = {"0": "Auto", "1": "QPSK", "2": "8PSK", "3": "16APSK", "5": "32APSK"}
|
||||
|
||||
SERVICE_TYPE = {"-2": "Unknown", "1": "TV", "2": "Radio", "3": "Data",
|
||||
"10": "Radio", "12": "Data", "22": "TV", "25": "TV (HD)",
|
||||
"10": "Radio", "12": "Data", "22": "TV", "25": "TV (HD)", "31": "TV (UHD)",
|
||||
"136": "Data", "139": "Data"}
|
||||
|
||||
CAS = {"C:2600": "BISS", "C:0b00": "Conax", "C:0b01": "Conax", "C:0b02": "Conax", "C:0baa": "Conax", "C:0602": "Irdeto",
|
||||
|
||||
@@ -44,14 +44,10 @@ def write_bouquet(path, name, bq_type, channels):
|
||||
def to_bouquet_id(ch):
|
||||
""" Creates bouquet channel id """
|
||||
data_type = ch.data_id
|
||||
if data_type and len(data_type) > 4:
|
||||
data_type = int(ch.data_id.split(":")[4])
|
||||
|
||||
if data_type and len(data_type) > 2:
|
||||
data_type = int(ch.data_id.split(":")[-2])
|
||||
if data_type == 22:
|
||||
data_type = 16
|
||||
elif data_type == 25:
|
||||
data_type = 19
|
||||
return "{}:0:{}:{}:0:0:0:".format(1, data_type, ch.fav_id)
|
||||
return "{}:0:{:X}:{}:0:0:0:".format(1, data_type, ch.fav_id)
|
||||
|
||||
|
||||
def get_bouquet(path, name, bq_type):
|
||||
@@ -69,6 +65,7 @@ def get_bouquet(path, name, bq_type):
|
||||
else:
|
||||
fav_id = "{}:{}:{}:{}".format(ch_data[3], ch_data[4], ch_data[5], ch_data[6])
|
||||
services.append(BouquetService(None, BqServiceType.DEFAULT, fav_id, 0))
|
||||
|
||||
return srvs[0].strip("#NAME").strip(), services
|
||||
|
||||
|
||||
@@ -89,6 +86,7 @@ def parse_bouquets(path, bq_name, bq_type):
|
||||
services=services,
|
||||
locked=None,
|
||||
hidden=None))
|
||||
|
||||
return bouquets
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user