diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-08 15:36:49 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-08 15:36:49 +0000 |
| commit | 7416bb955a8eee1764a969116a54e3996fec429d (patch) | |
| tree | 4b7a46276d9a748aa9fe2bd948f47098a302672f /lib/python/Plugins/Extensions/DVDPlayer | |
| parent | db46f952f934ea8532527cbbdf21ef283cacda20 (diff) | |
| download | enigma2-7416bb955a8eee1764a969116a54e3996fec429d.tar.gz enigma2-7416bb955a8eee1764a969116a54e3996fec429d.zip | |
get rid of hardcoded path to cdrom device
Diffstat (limited to 'lib/python/Plugins/Extensions/DVDPlayer')
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index b9d9ce79..b201d2c6 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -12,6 +12,7 @@ from Components.MenuList import MenuList from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase from Components.config import config from Tools.Directories import pathExists, fileExists +from Components.Harddisk import harddiskmanager import servicedvd # load c++ part of dvd player plugin @@ -338,9 +339,9 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.dvd_device = dvd_device self.physicalDVD = True else: - if fileExists("/dev/cdroms/cdrom0"): - print "physical dvd found (/dev/cdroms/cdrom0)" - self.dvd_device = "/dev/cdroms/cdrom0" + if fileExists(harddiskmanager.getCD()): + print "physical dvd found:", harddiskmanager.getCD() + self.dvd_device = harddiskmanager.getCD() self.physicalDVD = True else: self.dvd_device = None @@ -541,7 +542,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP def showFileBrowser(self): if self.physicalDVD and len(self.dvd_filelist) == 0: - if self.dvd_device == "/dev/cdroms/cdrom0": + if self.dvd_device == harddiskmanager.getCD(): self.session.openWithCallback(self.DVDdriveCB, MessageBox, text=_("Do you want to play DVD in drive?"), timeout=5 ) else: self.DVDdriveCB(True) |
