aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
diff options
context:
space:
mode:
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-21 15:29:54 +0000
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-21 15:29:54 +0000
commitfc1c1768923a6ec3c3439a851b616095d60d81b3 (patch)
tree0f34ae5a1899e486fb7923c2e663ea715237d074 /lib/python/Plugins/Extensions/DVDPlayer/plugin.py
parent1428fa3eee06d2f0226c2080dff723e3fac1d16b (diff)
downloadenigma2-fc1c1768923a6ec3c3439a851b616095d60d81b3.tar.gz
enigma2-fc1c1768923a6ec3c3439a851b616095d60d81b3.zip
allow playing audio cds without mediascanner (choice in mediaplayer menu). offer playing dvd only if disc in drive actually is a
dvd
Diffstat (limited to 'lib/python/Plugins/Extensions/DVDPlayer/plugin.py')
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/plugin.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index b201d2c6..4298642c 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
@@ -334,18 +334,25 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
})
self.onClose.append(self.__onClose)
-
+ self.physicalDVD = False
+ self.dvd_device = None
if dvd_device:
self.dvd_device = dvd_device
self.physicalDVD = True
else:
- if fileExists(harddiskmanager.getCD()):
- print "physical dvd found:", harddiskmanager.getCD()
- self.dvd_device = harddiskmanager.getCD()
- self.physicalDVD = True
- else:
- self.dvd_device = None
- self.physicalDVD = False
+ devicepath = harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD())
+ if pathExists(devicepath):
+ from Components.Scanner import scanDevice
+ res = scanDevice(devicepath)
+ list = [ (r.description, r, res[r], self.session) for r in res ]
+ if list:
+ (desc, scanner, files, session) = list[0]
+ for file in files:
+ print file
+ if file.mimetype == "video/x-dvd":
+ self.dvd_device = devicepath
+ print "physical dvd found:", self.dvd_device
+ self.physicalDVD = True
self.dvd_filelist = dvd_filelist
self.onFirstExecBegin.append(self.showFileBrowser)
@@ -542,7 +549,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
def showFileBrowser(self):
if self.physicalDVD and len(self.dvd_filelist) == 0:
- if self.dvd_device == harddiskmanager.getCD():
+ if self.dvd_device == harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()):
self.session.openWithCallback(self.DVDdriveCB, MessageBox, text=_("Do you want to play DVD in drive?"), timeout=5 )
else:
self.DVDdriveCB(True)