X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9388629a4f48442984dcf3dc0f2c244c6633618c..a90424c0dc460b587898b65f6a89a564399ab551:/lib/python/Components/Harddisk.py diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 9c695a23..f7c3a7cb 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -203,6 +203,12 @@ class Harddisk: return -3 return 0 + + def getDeviceDir(self): + return self.devidex + + def getDeviceName(self): + return self.getDeviceDir() + "disc" class Partition: def __init__(self, mountpoint, description = "", force_mounted = False): @@ -242,7 +248,7 @@ class Partition: class HarddiskManager: def __init__(self): self.hdd = [ ] - + self.cd = "" self.partitions = [ ] self.on_partition_list_change = CList() @@ -295,6 +301,8 @@ class HarddiskManager: if partition[0:len(blockdev)] != blockdev: continue partitions.append(partition) + else: + self.cd = blockdev except IOError: error = True return error, blacklisted, removable, is_cdrom, partitions @@ -357,6 +365,9 @@ class HarddiskManager: list.append((hdd, hd)) return list + def getCD(self): + return self.cd + def getMountedPartitions(self, onlyhotplug = False): return [x for x in self.partitions if (x.is_hotplug or not onlyhotplug) and x.mounted()]