from Components.config import configfile
from ChannelSelection import ChannelSelection
-
from Components.ServiceName import ServiceName
from Components.EventInfo import EventInfo
-from Components.ServicePosition import ServicePosition
from EpgSelection import EPGSelection
from Screens.MessageBox import MessageBox
-from Screens.MovieSelection import MovieSelection
from Screens.Volume import Volume
from Screens.Mute import Mute
from Screens.Standby import Standby
#from enigma import eTimer, eDVBVolumecontrol, quitMainloop
from enigma import *
+import time
+
# hack alert!
from Menu import MainMenu, mdom
if len(self.field) >= 4:
self.keyOK()
- def __init__(self, number):
- Screen.__init__(self)
+ def __init__(self, session, number):
+ Screen.__init__(self, session)
self.field = str(number)
self["number"] = Label(self.field)
def quit(self):
# self.session.open(Standby, self)
- configfile.save()
+ ref = self.session.nav.getCurrentlyPlayingServiceReference()
+ if ref is not None:
+ refstr = ref.toString()
+ else:
+ refstr = ""
+
+ #configfile.save()
quitMainloop(0)
#instantiate forever
self.servicelist = self.session.instantiateDialog(ChannelSelection)
- self["ChannelSelectActions"] = ActionMap( ["InfoBarChannelSelection"],
+ self["ChannelSelectActions"] = ActionMap( ["InfobarChannelSelection"],
{
"switchChannelUp": self.switchChannelUp,
"switchChannelDown": self.switchChannelDown,
class InfoBarMenu:
""" Handles a menu action, to open the (main) menu """
def __init__(self):
- self["MenuActions"] = ActionMap( [ "InfoBarMenuActions" ],
+ self["MenuActions"] = ActionMap( [ "InfobarMenuActions" ],
{
"mainMenu": self.mainMenu,
})
"""Instant Record - handles the instantRecord action in order to
start/stop instant records"""
def __init__(self):
- self["InstnantRecordActions"] = ActionMap( [ "InfoBarInstantRecord" ],
+ self["InstnantRecordActions"] = ActionMap( [ "InfobarInstantRecord" ],
{
"instantRecord": self.instantRecord,
})
self.session.openWithCallback(self.recordQuestionCallback, MessageBox, "Do you want to stop the current\n(instant) recording?")
else:
self.session.openWithCallback(self.recordQuestionCallback, MessageBox, "Start recording?")
+
+from Screens.AudioSelection import AudioSelection
+
+class InfoBarAudioSelection:
+ def __init__(self):
+ self["AudioSelectionAction"] = ActionMap( [ "InfobarAudioSelectionActions" ],
+ {
+ "audioSelection": self.audioSelection,
+ })
+
+ def audioSelection(self):
+ service = self.session.nav.getCurrentService()
+ audio = service.audioTracks()
+ n = audio.getNumberOfTracks()
+ if n > 0:
+ self.session.open(AudioSelection, audio)