aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2009-08-04 13:26:48 +0200
committerFraxinas <andreas.frisch@multimedia-labs.de>2009-08-04 13:26:48 +0200
commitbb2800462a81afbcfce36fa15d90808d13eae55b (patch)
treeb30fae73345441798c1d65c366f7799468997d44 /lib/python
parentd94506110fbfebcd3f49546c2403b5448589362a (diff)
downloadenigma2-bb2800462a81afbcfce36fa15d90808d13eae55b.tar.gz
enigma2-bb2800462a81afbcfce36fa15d90808d13eae55b.zip
allow two different behaviours when going into resume: SUSPEND_STOPS (default as usual) and new SUSPEND_PAUSES (introduced for dvd player)
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/plugin.py2
-rw-r--r--lib/python/Screens/Screen.py1
-rw-r--r--lib/python/Screens/Standby.py17
3 files changed, 15 insertions, 5 deletions
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index e7a4601e..ce5fa9d2 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
@@ -166,7 +166,7 @@ class ChapterZap(Screen):
self.Timer.start(3000, True)
class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarPVRState, InfoBarShowHide, HelpableScreen, InfoBarCueSheetSupport):
-# ALLOW_SUSPEND = True
+ ALLOW_SUSPEND = Screen.SUSPEND_PAUSES
ENABLE_RESUME_SUPPORT = True
skin = """
diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py
index 2ba7342f..7ac7841c 100644
--- a/lib/python/Screens/Screen.py
+++ b/lib/python/Screens/Screen.py
@@ -9,6 +9,7 @@ from Components.GUIComponent import GUIComponent
class Screen(dict, GUISkin):
+ False, SUSPEND_STOPS, SUSPEND_PAUSES = range(3)
ALLOW_SUSPEND = False
global_screen = None
diff --git a/lib/python/Screens/Standby.py b/lib/python/Screens/Standby.py
index d3767f33..4a9dca40 100644
--- a/lib/python/Screens/Standby.py
+++ b/lib/python/Screens/Standby.py
@@ -45,10 +45,17 @@ class Standby(Screen):
#mute adc
self.setMute()
- #get currently playing service reference
- self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceReference()
- #stop actual played dvb-service
- self.session.nav.stopService()
+
+ if self.session.current_dialog.ALLOW_SUSPEND == Screen.SUSPEND_STOPS:
+ #get currently playing service reference
+ self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceReference()
+ #stop actual played dvb-service
+ self.session.nav.stopService()
+ self.paused_service = None
+ elif self.session.current_dialog.ALLOW_SUSPEND == Screen.SUSPEND_PAUSES:
+ self.paused_service = self.session.current_dialog
+ self.paused_service.pauseService()
+ self.prev_running_service = None
#set input to vcr scart
if SystemInfo["ScartSwitch"]:
self.avswitch.setInput("SCART")
@@ -63,6 +70,8 @@ class Standby(Screen):
def __onClose(self):
if self.prev_running_service:
self.session.nav.playService(self.prev_running_service)
+ elif self.paused_service:
+ self.paused_service.unPauseService()
def createSummary(self):
return StandbySummary