mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
9fed1d5092
@ -339,7 +339,11 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
'to be able to send to the device. For example, you might have '
|
'to be able to send to the device. For example, you might have '
|
||||||
'audio books in your library with the extension "m4b" that you '
|
'audio books in your library with the extension "m4b" that you '
|
||||||
'want to listen to on your device. Don\'t worry about the "extra '
|
'want to listen to on your device. Don\'t worry about the "extra '
|
||||||
'enabled extensions" warning.')
|
'enabled extensions" warning.'),
|
||||||
|
_('Ignore device free space') + ':::<p>' +
|
||||||
|
_("Check this box to ignore the amount of free space reported by your "
|
||||||
|
"devices. This might be needed if you store books on an SD card and "
|
||||||
|
"the device doesn't have much free main memory.") + '</p>',
|
||||||
]
|
]
|
||||||
EXTRA_CUSTOMIZATION_DEFAULT = [
|
EXTRA_CUSTOMIZATION_DEFAULT = [
|
||||||
False, '',
|
False, '',
|
||||||
@ -350,7 +354,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
False, '',
|
False, '',
|
||||||
True, '75',
|
True, '75',
|
||||||
True, '',
|
True, '',
|
||||||
''
|
'', False,
|
||||||
]
|
]
|
||||||
OPT_AUTOSTART = 0
|
OPT_AUTOSTART = 0
|
||||||
OPT_PASSWORD = 2
|
OPT_PASSWORD = 2
|
||||||
@ -364,6 +368,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
OPT_COMPRESSION_QUALITY = 13
|
OPT_COMPRESSION_QUALITY = 13
|
||||||
OPT_USE_METADATA_CACHE = 14
|
OPT_USE_METADATA_CACHE = 14
|
||||||
OPT_EXTRA_EXTENSIONS = 16
|
OPT_EXTRA_EXTENSIONS = 16
|
||||||
|
OPT_IGNORE_FREESPACE = 17
|
||||||
OPTNAME_TO_NUMBER_MAP = {
|
OPTNAME_TO_NUMBER_MAP = {
|
||||||
'password': OPT_PASSWORD,
|
'password': OPT_PASSWORD,
|
||||||
'autostart': OPT_AUTOSTART,
|
'autostart': OPT_AUTOSTART,
|
||||||
@ -1271,6 +1276,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
self._debug()
|
self._debug()
|
||||||
opcode, result = self._call_client('FREE_SPACE', {})
|
opcode, result = self._call_client('FREE_SPACE', {})
|
||||||
if opcode == 'OK':
|
if opcode == 'OK':
|
||||||
|
self._debug('free space:', result['free_space_on_device'])
|
||||||
return (result['free_space_on_device'], 0, 0)
|
return (result['free_space_on_device'], 0, 0)
|
||||||
# protocol error if we get here
|
# protocol error if we get here
|
||||||
return (0, 0, 0)
|
return (0, 0, 0)
|
||||||
@ -1470,8 +1476,9 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
self._debug(names)
|
self._debug(names)
|
||||||
else:
|
else:
|
||||||
self._debug()
|
self._debug()
|
||||||
sanity_check(on_card='', files=files, card_prefixes=[],
|
if not self.settings().extra_customization[self.OPT_IGNORE_FREESPACE]:
|
||||||
free_space=self.free_space())
|
sanity_check(on_card='', files=files, card_prefixes=[],
|
||||||
|
free_space=self.free_space())
|
||||||
paths = []
|
paths = []
|
||||||
names = iter(names)
|
names = iter(names)
|
||||||
metadata = iter(metadata)
|
metadata = iter(metadata)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user