- if fileExists("/dev/cdroms/cdrom0"):
- print "physical dvd found (/dev/cdroms/cdrom0)"
- self.dvd_device = "/dev/cdroms/cdrom0"
- 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