Skip to content

Commit

Permalink
Merge branch 'Developer' into Python3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ev0-BH committed Oct 9, 2023
2 parents dafb544 + 6bb5280 commit 33c7011
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 24 deletions.
3 changes: 0 additions & 3 deletions lib/python/Components/Converter/ServiceName.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ class ServiceName(Converter):
def __init__(self, type):
Converter.__init__(self, type)
self.epgQuery = eEPGCache.getInstance().lookupEventTime
self.mode = ""
self.parts = type.split(",")
if len(self.parts) > 1:
self.type = self.FORMAT_STRING
self.separatorChar = self.parts[0]
else:
if ';' in type:
type, self.mode = type.split(';')
if type == "Provider":
self.type = self.PROVIDER
elif type == "Reference":
Expand Down
22 changes: 14 additions & 8 deletions lib/python/Screens/MovieSelection.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from Screens.Screen import Screen
from Components.Button import Button
from Components.ActionMap import HelpableActionMap, ActionMap, HelpableNumberActionMap
Expand Down Expand Up @@ -32,6 +33,7 @@
import NavigationInstance
import RecordTimer
from ServiceReference import ServiceReference
from skin import parameters

from enigma import eServiceReference, eServiceCenter, eTimer, eSize, iPlayableService, iServiceInformation, getPrevAsciiCode, eRCInput
import os
Expand Down Expand Up @@ -1712,14 +1714,7 @@ def reloadWithDelay(self):
self.loadLocalSettings()
self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)
self.updateTags()
title = ""
if config.usage.setup_level.index >= 2: # expert+
title += config.movielist.last_videodir.value
if self.selected_tags:
title += " - " + ','.join(self.selected_tags)
if self.collectionName:
title += ": %s" % self.collectionName
self.setTitle(title)
self.updateTitle()
self.displayMovieOffStatus()
self.displaySortStatus()
if not (self.reload_sel and self["list"].moveTo(self.reload_sel)):
Expand All @@ -1738,6 +1733,17 @@ def reloadWithDelay(self):
self.callLater(self.preview)
self.callLater(self.enablePathSelect)

def updateTitle(self):
separatorChar = parameters.get("MovieSelectionTitleSeparatorChar", "-")
title = []
if config.usage.setup_level.index >= 2: # expert+
title.append(config.movielist.last_videodir.value)
if self.selected_tags:
title.append(','.join(self.selected_tags))
if self.collectionName:
title.append(self.collectionName)
self.title = (" %s " % separatorChar).join(title)

def enablePathSelect(self):
self.pathselectEnabled = True

Expand Down
15 changes: 2 additions & 13 deletions lib/python/skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
menus = {} # Dictionary of images associated with menu entries.
menuicons = {} # Dictionary of icons associated with menu items.
parameters = {} # Dictionary of skin parameters used to modify code behavior.
stringparameters = {} # Dictionary that contains string type parameters for use in screens
setups = {} # Dictionary of images associated with setup menus.
switchPixmap = {} # Dictionary of switch images.
scrollbarStyle = None # When set, a dictionary of scrollbar styles
Expand Down Expand Up @@ -65,7 +64,7 @@

def InitSkins(booting=True):
global currentPrimarySkin, currentDisplaySkin
global domScreens, colors, BodyFont, fonts, menus, menuicons, parameters, stringparameters, setups, switchPixmap, scrollbarStyle, windowStyles, xres, yres
global domScreens, colors, BodyFont, fonts, menus, menuicons, parameters, setups, switchPixmap, scrollbarStyle, windowStyles, xres, yres
# Reset skin dictionaries. We can reload skins without a restart
# Make sure we keep the original dictionaries as many modules now import skin globals explicitly
domScreens.clear()
Expand All @@ -77,7 +76,6 @@ def InitSkins(booting=True):
menus.clear()
menuicons.clear()
parameters.clear()
stringparameters.clear()
setups.clear()
switchPixmap.clear()
scrollbarStyle = None
Expand Down Expand Up @@ -766,7 +764,7 @@ def reloadWindowStyles():
def loadSingleSkinData(desktop, screenID, domSkin, pathSkin, scope=SCOPE_CURRENT_SKIN):
"""Loads skin data like colors, windowstyle etc."""
assert domSkin.tag == "skin", "root element in skin must be 'skin'!"
global colors, fonts, menus, menuicons, parameters, stringparameters, setups, switchPixmap, scrollbarStyle, xres, yres
global colors, fonts, menus, menuicons, parameters, setups, switchPixmap, scrollbarStyle, xres, yres
for tag in domSkin.findall("output"):
scrnID = int(tag.attrib.get("id", GUI_SKIN_ID))
if scrnID == GUI_SKIN_ID:
Expand Down Expand Up @@ -939,15 +937,6 @@ def loadResolvedPixmap(filename):
# print("[Skin] DEBUG: Menu key='%s', image='%s'." % (key, image))
else:
raise SkinError("Tag 'menuicon' needs key and image, got key='%s' and image='%s'" % (key, image))
for tag in domSkin.findall("stringparameters"):
for stringparam in tag.findall("stringparam"):
key = stringparam.attrib.get("key")
value = stringparam.attrib.get("value")
if key and value:
stringparameters[key] = value
# print("[Skin] DEBUG: Menu key='%s', image='%s'." % (key, image))
else:
raise SkinError("Tag 'stringparameters' needs key and value, got key='%s' and value='%s'" % (key, value))
for tag in domSkin.findall("setups"):
for setup in tag.findall("setup"):
key = setup.attrib.get("key")
Expand Down

0 comments on commit 33c7011

Please sign in to comment.