Skip to content

Commit

Permalink
[MovieSelection] add custom title separator
Browse files Browse the repository at this point in the history
  • Loading branch information
Huevos committed Oct 9, 2023
1 parent 9eda36e commit 6bb5280
Showing 1 changed file with 14 additions and 8 deletions.
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

0 comments on commit 6bb5280

Please sign in to comment.