mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-03-18 02:21:15 +01:00
enabled transponder edit for cable services
This commit is contained in:
@@ -4,7 +4,7 @@ import re
|
||||
from app.commons import log
|
||||
from app.ui.uicommons import CODED_ICON, LOCKED_ICON, HIDE_ICON
|
||||
from .blacklist import get_blacklist
|
||||
from ..ecommons import Service, POLARIZATION, FEC, SERVICE_TYPE, Flag, T_FEC, TrType
|
||||
from ..ecommons import Service, POLARIZATION, FEC, SERVICE_TYPE, Flag, T_FEC, TrType, FEC_DEFAULT
|
||||
|
||||
_HEADER = "eDVB services /{}/"
|
||||
_SEP = ":" # separator
|
||||
@@ -225,23 +225,24 @@ def parse_services(services, transponders, path):
|
||||
service_type = SERVICE_TYPE.get(data[4], SERVICE_TYPE["-2"])
|
||||
# removing all non printable symbols!
|
||||
srv_name = "".join(c for c in ch[1] if c.isprintable())
|
||||
pol = POLARIZATION.get(tr[2], None)
|
||||
fec = FEC.get(tr[3], None)
|
||||
pol = None
|
||||
fec = None
|
||||
system = None
|
||||
pos = None
|
||||
|
||||
if tr_type is TrType.Satellite:
|
||||
pol = POLARIZATION.get(tr[2], None)
|
||||
fec = FEC.get(tr[3], None)
|
||||
system = "DVB-S2" if len(tr) > 7 else "DVB-S"
|
||||
pos = "{}.{}".format(tr[4][:-1], tr[4][-1:])
|
||||
if tr_type is TrType.Terrestrial:
|
||||
system = "DVB-T"
|
||||
pos = "T"
|
||||
pol = None
|
||||
fec = T_FEC.get(tr[3], None)
|
||||
elif tr_type is TrType.Cable:
|
||||
system = "DVB-C"
|
||||
pos = "C"
|
||||
pol = None
|
||||
fec = FEC_DEFAULT.get(tr[4])
|
||||
|
||||
channels.append(Service(flags_cas=ch[2],
|
||||
transponder_type=tr_type.value,
|
||||
|
||||
@@ -593,9 +593,10 @@ class ServiceDetailsDialog:
|
||||
tr_data[1] = self._freq_entry.get_text()
|
||||
tr_data[2] = self._rate_entry.get_text()
|
||||
tr_data[3] = get_value_by_name(Inversion, self._invertion_combo_box.get_active_id())
|
||||
tr_data[4] = self.get_value_from_combobox_id(self._mod_combo_box, T_MODULATION)
|
||||
tr_data[4] = self.get_value_from_combobox_id(self._mod_combo_box, C_MODULATION)
|
||||
tr_data[5] = self.get_value_from_combobox_id(self._fec_combo_box, FEC_DEFAULT)
|
||||
tr_data[6] = get_value_by_name(SystemCable, self._sys_combo_box.get_active_id())
|
||||
return "{} {}".format(tr_data[0], ":".join(tr_data[1:]))
|
||||
return self._old_service.transponder
|
||||
|
||||
def update_transponder_services(self, transponder):
|
||||
@@ -632,7 +633,7 @@ class ServiceDetailsDialog:
|
||||
|
||||
@run_idle
|
||||
def on_tr_edit_toggled(self, switch, active):
|
||||
if active and self._profile is Profile.ENIGMA_2 and self._old_service.transponder_type in "tc":
|
||||
if active and self._profile is Profile.ENIGMA_2 and self._old_service.transponder_type == "t":
|
||||
show_dialog(DialogType.ERROR, transient=self._dialog, text="Not implemented yet!")
|
||||
switch.set_active(False)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user