fix non working invert of oled display
[enigma2.git] / lib / python / Components / Harddisk.py
index e0b668720c4e9bdf9ee1d260e1399f06d3fd35eb..f7c3a7cb4ffdbf22f884eb4ef16b709f11aaf2b6 100644 (file)
@@ -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
@@ -355,9 +363,11 @@ class HarddiskManager:
                        if cap != "":
                                hdd += " (" + cap + ")"
                        list.append((hdd, hd))
-               print "list", list
                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()]