aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/InfoBar.py
blob: def45d69efd8a05735151447748e00c1b6b00b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from Screen import Screen

from Components.Clock import Clock
from Components.ActionMap import ActionMap
from Screens.AudioSelection import AudioSelection
from Screens.MovieSelection import MovieSelection

from Screens.InfoBarGenerics import InfoBarVolumeControl, InfoBarShowHide, \
	InfoBarPowerKey, InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, \
	InfoBarEPG, InfoBarEvent, InfoBarServiceName, InfoBarPVR, InfoBarInstantRecord

from enigma import *

import time

class InfoBar(Screen, InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey, \
	InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, \
	InfoBarEvent, InfoBarServiceName, InfoBarPVR, InfoBarInstantRecord):
	def __init__(self, session):
		Screen.__init__(self, session)
		
		for x in InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey, \
			InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, \
			InfoBarEvent, InfoBarServiceName, InfoBarPVR, InfoBarInstantRecord:
			x.__init__(self)

		self["actions"] = ActionMap( [ "InfobarActions" ], 
			{
				"showMovies": self.showMovies,
				#"quit": self.quit,
				"audioSelection": self.audioSelection,
			})

		self["CurrentTime"] = Clock()
		# ServicePosition(self.session.nav, ServicePosition.TYPE_REMAINING)
		# Clock()

	def showMovies(self):
		self.session.open(MovieSelection)

	def audioSelection(self):
		service = self.session.nav.getCurrentService()
		audio = service.audioTracks()
		n = audio.getNumberOfTracks()
		if n > 0:
			self.session.open(AudioSelection, audio)