Subversion Repositories freemyipod

Rev

Rev 805 | Rev 864 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 805 Rev 809
Line 71... Line 71...
71
        self.dev.set_configuration(1)
71
        self.dev.set_configuration(1)
72
        self.generation = 11;
72
        self.generation = 11;
73
        self.type = 2;
73
        self.type = 2;
74
        print("Connected to iPod Classic 1G WTF mode, USB version %s"  % self.dev.bcdDevice)
74
        print("Connected to iPod Classic 1G WTF mode, USB version %s"  % self.dev.bcdDevice)
75
        return
75
        return
-
 
76
    except usb.core.USBError: pass
76
    try:
77
    try:
77
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1245)
78
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1245)
78
      if self.dev and generation in [0, 12] and type in [0, 2]:
79
      if self.dev and generation in [0, 12] and type in [0, 2]:
79
        self.dev.set_configuration(1)
80
        self.dev.set_configuration(1)
80
        self.generation = 12;
81
        self.generation = 12;
81
        self.type = 2;
82
        self.type = 2;
82
        print("Connected to iPod Classic 2G WTF mode, USB version %s"  % self.dev.bcdDevice)
83
        print("Connected to iPod Classic 2G WTF mode, USB version %s"  % self.dev.bcdDevice)
83
        return
84
        return
-
 
85
    except usb.core.USBError: pass
84
    try:
86
    try:
85
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1247)
87
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1247)
86
      if self.dev and generation in [0, 13] and type in [0, 2]:
88
      if self.dev and generation in [0, 13] and type in [0, 2]:
87
        self.dev.set_configuration(1)
89
        self.dev.set_configuration(1)
88
        self.generation = 13;
90
        self.generation = 13;