Esempio n. 1
0
def ipod_capacity(mountpoint = MOUNT_POINT):
    if not os.path.exists(mountpoint):
        raise ValueError("Mount point does not exist")
    device = gpod.itdb_device_new()
    gpod.itdb_device_set_mountpoint(device, mountpoint)
    info = gpod.itdb_device_get_ipod_info(device)
    return int((info.capacity - SIZE_FUDGE) * 1024 * 1024 * 1024)
Esempio n. 2
0
 def ipod_capacity(self):
     if not os.path.exists(self.path):
         raise ValueError("Mount point does not exist")
     device = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(device, self.path)
     info = gpod.itdb_device_get_ipod_info(device)
     print "Capacity: %i" % int((info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)
     return int((info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)
Esempio n. 3
0
 def ipod_capacity(self):
     if not os.path.exists(self.path):
         raise ValueError("Mount point does not exist")
     device = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(device, self.path)
     info = gpod.itdb_device_get_ipod_info(device)
     print "Capacity: %i" % int(
         (info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)
     return int((info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)
Esempio n. 4
0
 def get_dataproviders(self, udi, **props):
     #Read information about the ipod, like if it supports
     #photos or not
     d = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(d, props[PROPS_KEY_MOUNT])
     supportsPhotos = gpod.itdb_device_supports_photo(d)
     gpod.itdb_device_free(d)
     if supportsPhotos:
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay, IPodPhotoSink]
     else:
         log.info("iPod does not report photo support")
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay]
Esempio n. 5
0
 def get_dataproviders(self, udi, **props):
     #Read information about the ipod, like if it supports
     #photos or not
     d = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(d, props[PROPS_KEY_MOUNT])
     supportsPhotos = gpod.itdb_device_supports_photo(d)
     gpod.itdb_device_free(d)
     if supportsPhotos:
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay, IPodPhotoSink]
     else:
         log.info("iPod does not report photo support")
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay]