~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/devices/android/driver.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-08-26 07:33:55 UTC
  • mfrom: (1.5.3)
  • Revision ID: package-import@ubuntu.com-20130826073355-y2oss706wzjsxval
Tags: 1.0.0+dfsg-1
* New upstream release. (Closes: #720836)
* debian/calibre.install: Drop usr/etc, not shipped by upstream any more.
* debian/control: Add python-apsw dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
import cStringIO
10
10
 
 
11
from calibre import fsync
11
12
from calibre.devices.usbms.driver import USBMS
12
13
 
13
14
HTC_BCDS = [0x100, 0x0222, 0x0224, 0x0226, 0x227, 0x228, 0x229, 0x0231, 0x9999]
247
248
            'S5830I_CARD', 'MID7042', 'LINK-CREATE', '7035', 'VIEWPAD_7E',
248
249
            'NOVO7', 'MB526', '_USB#WYK7MSF8KE', 'TABLET_PC', 'F', 'MT65XX_MS',
249
250
            'ICS', 'E400', '__FILE-STOR_GADG', 'ST80208-1', 'GT-S5660M_CARD', 'XT894', '_USB',
250
 
            'PROD_TAB13-201', 'URFPAD2', 'MID1126', 'ST10216-1',
 
251
            'PROD_TAB13-201', 'URFPAD2', 'MID1126', 'ST10216-1', 'S5360L_CARD',
251
252
    ]
252
253
    WINDOWS_CARD_A_MEM = ['ANDROID_PHONE', 'GT-I9000_CARD', 'SGH-I897',
253
254
            'FILE-STOR_GADGET', 'SGH-T959_CARD', 'SGH-T959', 'SAMSUNG_ANDROID', 'GT-P1000_CARD',
400
401
 
401
402
        with open(os.path.join(path, 'coverCache', filename + '-medium.jpg'), 'wb') as coverfile:
402
403
            coverfile.write(coverdata)
 
404
            fsync(coverfile)
403
405
 
404
406
        coverdata = getattr(metadata, 'thumbnail', None)
405
407
        if coverdata and coverdata[2]:
423
425
        with open(os.path.join(path, 'coverCache', filename +
424
426
            '-small.jpg'), 'wb') as coverfile:
425
427
            coverfile.write(coverdata)
 
428
            fsync(coverfile)
426
429
 
427
430
 
428
431