aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-05-23 11:12:42 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-05-23 11:12:42 +0000
commit5b1ffb7f189a2ebf1389595fe2e33ef816805480 (patch)
tree565df1794fdd59452162f1e8dc8e738c6d638cb7 /lib/python/Plugins/Extensions/DVDPlayer/plugin.py
parent06c6fcf1e814c32ef8aaa6cb6f5e3a567f64c866 (diff)
downloadenigma2-5b1ffb7f189a2ebf1389595fe2e33ef816805480.tar.gz
enigma2-5b1ffb7f189a2ebf1389595fe2e33ef816805480.zip
save / restore video settings
Diffstat (limited to 'lib/python/Plugins/Extensions/DVDPlayer/plugin.py')
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/plugin.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index 8a4c8611..96ed5f67 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
@@ -321,7 +321,10 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
self.onFirstExecBegin.append(self.showFileBrowser)
self.service = None
self.in_menu = False
-
+ self.old_aspect = open("/proc/stb/video/aspect", "r").read()
+ self.old_policy = open("/proc/stb/video/policy", "r").read()
+ self.old_wss = open("/proc/stb/denc/0/wss", "r").read()
+
def keyNumberGlobal(self, number):
print "You pressed number " + str(number)
self.session.openWithCallback(self.numberEntered, ChapterZap, number)
@@ -531,6 +534,11 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
pass
def __onClose(self):
+ for i in (("/proc/stb/video/aspect", self.old_aspect), ("/proc/stb/video/policy", self.old_policy), ("/proc/stb/denc/0/wss", self.old_wss)):
+ try:
+ open(i[0], "w").write(i[1])
+ except IOError:
+ print "restore", i[0], "failed"
self.restore_infobar_seek_config()
self.session.nav.playService(self.oldService)