From 588df32b2fd28c9e3d91945cc2e8d41134fb7657 Mon Sep 17 00:00:00 2001 From: Dmitriy Yefremov Date: Mon, 12 Feb 2018 14:27:21 +0300 Subject: [PATCH] added IPTV icon --- app/eparser/iptv.py | 3 ++- app/ui/__init__.py | 1 + app/ui/main_app_window.py | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/eparser/iptv.py b/app/eparser/iptv.py index 342dbbd7..45e1cdce 100644 --- a/app/eparser/iptv.py +++ b/app/eparser/iptv.py @@ -1,5 +1,6 @@ """ Module for m3u import """ from app.properties import Profile +from app.ui import IPTV_ICON from .ecommons import BqServiceType, Service # url, description, urlkey, account, usrname, psw, s_type, iconsrc, iconsrc_b, group @@ -24,7 +25,7 @@ def parse_m3u(path, profile): fav_id = ENIGMA2_FAV_ID_FORMAT.format(line.strip().replace(":", "%3a"), name, name, None) elif profile is Profile.NEUTRINO_MP: fav_id = NEUTRINO_FAV_ID_FORMAT.format(line.strip(), "", 0, None, None, None, None, "", "", 1) - srv = Service(*aggr[0:3], name, *aggr[0:3], BqServiceType.IPTV.name, *aggr, fav_id, None) + srv = Service(None, None, IPTV_ICON, name, *aggr[0:3], BqServiceType.IPTV.name, *aggr, fav_id, None) channels.append(srv) return channels diff --git a/app/ui/__init__.py b/app/ui/__init__.py index cdd99b27..811757c8 100644 --- a/app/ui/__init__.py +++ b/app/ui/__init__.py @@ -15,6 +15,7 @@ LOCKED_ICON = theme.load_icon("system-lock-screen", 16, 0) if theme.lookup_icon( "system-lock-screen", 16, 0) else _IMAGE_MISSING HIDE_ICON = theme.load_icon("go-jump", 16, 0) if theme.lookup_icon("go-jump", 16, 0) else _IMAGE_MISSING TV_ICON = theme.load_icon("tv-symbolic", 16, 0) if theme.lookup_icon("tv-symbolic", 16, 0) else _IMAGE_MISSING +IPTV_ICON = theme.load_icon("emblem-shared", 16, 0) if theme.load_icon("emblem-shared", 16, 0) else None if __name__ == "__main__": pass diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 780ea65a..5f834471 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -11,7 +11,7 @@ from app.eparser.ecommons import CAS, FLAG from app.eparser.enigma.bouquets import BqServiceType from app.eparser.neutrino.bouquets import BqType from app.properties import get_config, write_config, Profile -from . import Gtk, Gdk, UI_RESOURCES_PATH, LOCKED_ICON, HIDE_ICON +from . import Gtk, Gdk, UI_RESOURCES_PATH, LOCKED_ICON, HIDE_ICON, IPTV_ICON from .dialogs import show_dialog, DialogType, get_chooser_dialog from .download_dialog import show_download_dialog from .main_helper import edit_marker, insert_marker, move_items, edit, ViewTarget, set_flags, locate_in_services, \ @@ -526,7 +526,8 @@ class MainAppWindow: # IPTV and MARKER services s_type = srv.type if s_type is BqServiceType.MARKER or s_type is BqServiceType.IPTV: - srv = Service(*agr[0:3], srv.name, *agr[0:3], s_type.name, *agr, srv.num, fav_id, None) + icon = IPTV_ICON if s_type is BqServiceType.IPTV else None + srv = Service(*agr[0:2], icon, srv.name, *agr[0:3], s_type.name, *agr, srv.num, fav_id, None) self.__services[fav_id] = srv services.append(fav_id) self.__bouquets["{}:{}".format(name, bt_type)] = services