Compare commits

..

5 Commits

Author SHA1 Message Date
DYefremov
25fba17b9c version update -> 3.11.3 2024-11-28 22:45:38 +03:00
DYefremov
f77a55eadd fix assign ref data (#209) 2024-11-28 22:37:32 +03:00
DYefremov
b6e73e5e7a pos sort for picons downloader 2024-11-26 21:08:09 +03:00
DYefremov
780bda1f12 data read adjustment 2024-11-26 20:37:20 +03:00
DYefremov
a4a44692e2 fix warn 2024-11-26 20:18:46 +03:00
12 changed files with 37 additions and 25 deletions

View File

@@ -172,6 +172,8 @@ class LameDbReader:
onid = str(data[1]).lstrip(sp).upper()
# For comparison in bouquets. Needed in upper case!!!
fav_id = f"1:0:{srv_type:X}:{ssid}:{tid}:{nid}:{onid}:0:0:0:"
if len(data) > 9:
fav_id = f"{fav_id}:0:0:0:0"
picon_id = f"1_0_{srv_type:X}_{ssid}_{tid}_{nid}_{onid}_0_0_0.png"
all_flags = srv[2].split(",")

View File

@@ -354,9 +354,9 @@ class PiconsParser(HTMLParser):
class ProviderParser(HTMLParser):
""" Parser for satellite html page. (https://www.lyngsat.com/*sat-name*.html) """
_POSITION_PATTERN = re.compile("at\s\d+\..*(?:E|W)']")
_ONID_TID_PATTERN = re.compile("^\d+-\d+.*")
_TRANSPONDER_FREQUENCY_PATTERN = re.compile("^\d+ [HVLR]+")
_POSITION_PATTERN = re.compile(r"at\s\d+\..*(?:E|W)']")
_ONID_TID_PATTERN = re.compile(r"^\d+-\d+.*")
_TRANSPONDER_FREQUENCY_PATTERN = re.compile(r"^\d+ [HVLR]+")
_DOMAINS = {"/tvchannels/", "/radiochannels/", "/packages/", "/logo/"}
_BASE_URL = "https://www.lyngsat.com"

View File

@@ -40,7 +40,7 @@ Author: Dmitriy Yefremov
<property name="icon_name">system-help</property>
<property name="type_hint">normal</property>
<property name="program_name">DemonEditor</property>
<property name="version">3.11.2 Beta</property>
<property name="version">3.11.3 Beta</property>
<property name="copyright">2018-2024 Dmitriy Yefremov
</property>
<property name="comments" translatable="yes">Enigma2 channel and satellite list editor.</property>

View File

@@ -110,16 +110,20 @@ class EpgCache(abc.ABC):
self._canceled = True
@abc.abstractmethod
def reset(self) -> None: pass
def reset(self) -> None:
pass
@abc.abstractmethod
def update_epg_data(self) -> bool: pass
def update_epg_data(self) -> bool:
pass
@abc.abstractmethod
def get_current_event(self, service_name) -> EpgEvent: pass
def get_current_event(self, service_name) -> EpgEvent:
pass
@abc.abstractmethod
def get_current_events(self, service_name) -> list: pass
def get_current_events(self, service_name) -> list:
pass
@staticmethod
def get_gz_file_name(url, path):
@@ -1209,7 +1213,7 @@ class EpgDialog:
fav_id = row[Column.FAV_ID]
fav_id_data = fav_id.split(":")
fav_id_data[3:7] = data[-3].split(":")
fav_id_data[3:7] = data[-3].split(":")[3:7]
if data[-2]:
row[Column.FAV_POS] = data[-2]

View File

@@ -1746,7 +1746,7 @@ Author: Dmitriy Yefremov
<object class="GtkLabel" id="app_ver_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label">3.11.2 Beta</property>
<property name="label">3.11.3 Beta</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>

View File

@@ -79,7 +79,7 @@ from .xml.edit import SatellitesTool
class Application(Gtk.Application):
""" Main application class. """
VERSION = "3.11.2"
VERSION = "3.11.3"
SERVICE_MODEL = "services_list_store"
FAV_MODEL = "fav_list_store"

View File

@@ -819,7 +819,10 @@ def get_pos_num(pos):
if len(pos) > 1:
m = -1 if pos[-1] == "W" else 1
return float(pos[:-1]) * m
try:
return float(pos[:-1]) * m
except ValueError:
return -183
return -181.0 if pos == "T" else -182.0

View File

@@ -44,7 +44,7 @@ from app.tools.picons import (PiconsParser, parse_providers, Provider, convert_t
from app.tools.satellites import SatellitesParser, SatelliteSource
from .dialogs import show_dialog, DialogType, translate, get_builder, get_chooser_dialog
from .main_helper import (scroll_to, on_popup_menu, get_base_model, set_picon, get_picon_pixbuf, get_picon_dialog,
get_picon_file_name, get_pixbuf_from_data, get_pixbuf_at_scale)
get_picon_file_name, get_pixbuf_from_data, get_pixbuf_at_scale, get_pos_num)
from .uicommons import Gtk, Gdk, UI_RESOURCES_PATH, TV_ICON, Column, KeyboardKey, Page, ViewTarget
@@ -680,7 +680,7 @@ class PiconManager(Gtk.Box):
model.clear()
try:
for sat in sorted(sats):
for sat in sorted(sats, key=lambda s: get_pos_num(s[1]), reverse=True):
pos = sat[1]
name = f"{sat[0]} ({pos})"
if is_filter and pos not in self._sat_positions:
@@ -825,9 +825,10 @@ class PiconManager(Gtk.Box):
services = self._app.current_services
ids = set()
for s in (services.get(fav_id) for fav_id in fav_bouquet):
ids.add(s.picon_id)
ids.add(get_picon_file_name(s.service))
for s in (services.get(fav_id, None) for fav_id in fav_bouquet):
if s:
ids.add(s.picon_id)
ids.add(get_picon_file_name(s.service))
return ids
def process_provider(self, prv, picons_path):

View File

@@ -303,6 +303,7 @@ class ServiceDetailsDialog:
data = srv.data_id.split(":")
tr_data = srv.transponder.split(":")
tr_type = TrType(srv.transponder_type)
data_len = len(tr_data)
self._namespace_entry.set_text(str(int(data[1], 16)))
self._transponder_id_entry.set_text(str(int(data[2], 16)))
@@ -311,11 +312,12 @@ class ServiceDetailsDialog:
if tr_type is TrType.Satellite:
self.select_active_text(self._invertion_combo_box, Inversion(tr_data[5]).name)
if srv.system == "DVB-S2":
self.select_active_text(self._mod_combo_box, MODULATION.get(tr_data[8]))
self.select_active_text(self._rolloff_combo_box, ROLL_OFF.get(tr_data[9]))
self.select_active_text(self._pilot_combo_box, Pilot(tr_data[10]).name)
self._tr_flag_entry.set_text(tr_data[7])
if len(tr_data) > 12:
if data_len > 9:
self.select_active_text(self._mod_combo_box, MODULATION.get(tr_data[8]))
self.select_active_text(self._rolloff_combo_box, ROLL_OFF.get(tr_data[9]))
self.select_active_text(self._pilot_combo_box, Pilot(tr_data[10]).name)
self._tr_flag_entry.set_text(tr_data[7])
if data_len > 12:
self._stream_id_entry.set_text(tr_data[11])
self._pls_code_entry.set_text(tr_data[12])
self.select_active_text(self._pls_mode_combo_box, PLS_MODE.get(tr_data[13]))

View File

@@ -1,5 +1,5 @@
#!/bin/bash
VER="3.11.2_Beta"
VER="3.11.3_Beta"
B_PATH="dist/DemonEditor"
DEB_PATH="$B_PATH/usr/share/demoneditor"

View File

@@ -1,5 +1,5 @@
Package: demon-editor
Version: 3.11.2-Beta
Version: 3.11.3-Beta
Section: utils
Priority: optional
Architecture: all

View File

@@ -81,7 +81,7 @@ app = BUNDLE(coll,
'CFBundleGetInfoString': "Enigma2 channel and satellite editor",
'LSApplicationCategoryType': 'public.app-category.utilities',
'LSMinimumSystemVersion': '10.13',
'CFBundleShortVersionString': f"3.11.2.{BUILD_DATE} Beta",
'CFBundleShortVersionString': f"3.11.3.{BUILD_DATE} Beta",
'NSHumanReadableCopyright': u"Copyright © 2024, Dmitriy Yefremov",
'NSRequiresAquaSystemAppearance': 'false',
'NSHighResolutionCapable': 'true'