Skip to content

Commit 9627786

Browse files
committed
[Navigation]
* introduce new functions for recording counts
1 parent 97f95e9 commit 9627786

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/python/Navigation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from Components.ImportChannels import ImportChannels
1313
from Components.ParentalControl import parentalControl
1414
from Components.PluginComponent import plugins
15+
from Components.RecordingConfig import recType
1516
from Components.SystemInfo import BoxInfo
1617
from Plugins.Plugin import PluginDescriptor
1718
from Screens.InfoBar import InfoBar, MoviePlayer
@@ -542,6 +543,15 @@ def getCurrentService(self):
542543
self.currentlyPlayingService = self.pnav and self.pnav.getCurrentService()
543544
return self.currentlyPlayingService
544545

546+
def getAnyRecordingsCount(self):
547+
return len(self.getRecordings(False, pNavigation.isAnyRecording))
548+
549+
def getIndicatorRecordingsCount(self):
550+
return len(self.getRecordings(False, recType(config.recording.show_rec_symbol_for_rec_types.getValue())))
551+
552+
def getRealRecordingsCount(self):
553+
return len(self.getRecordings(False, pNavigation.isRealRecording))
554+
545555
def stopService(self):
546556
if self.pnav:
547557
self.pnav.stopService()

0 commit comments

Comments
 (0)