mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
made extra metadata downloading optional
This commit is contained in:
parent
bc12990553
commit
c50251a3f6
@ -3,7 +3,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
|||||||
print_function)
|
print_function)
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
__copyright__ = '2011, Kovid Goyal kovid@kovidgoyal.net'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@ -44,7 +44,7 @@ class OverDrive(Source):
|
|||||||
Source.__init__(self, *args, **kwargs)
|
Source.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
options = (
|
options = (
|
||||||
Option('get_full_metadata', 'bool', False, _('Gather all Metadata:'),
|
Option('get_full_metadata', 'bool', None, _('Gather all Metadata:'),
|
||||||
_('Enable this option to gather all metadata available from Overdrive.')),
|
_('Enable this option to gather all metadata available from Overdrive.')),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -59,10 +59,6 @@ class OverDrive(Source):
|
|||||||
prefs = self.prefs
|
prefs = self.prefs
|
||||||
prefs.defaults['get_full_metadata'] = False
|
prefs.defaults['get_full_metadata'] = False
|
||||||
|
|
||||||
@property
|
|
||||||
def get_full_metadata(self):
|
|
||||||
return self.prefs['get_full_metadata']
|
|
||||||
|
|
||||||
def identify(self, log, result_queue, abort, title=None, authors=None, # {{{
|
def identify(self, log, result_queue, abort, title=None, authors=None, # {{{
|
||||||
identifiers={}, timeout=30):
|
identifiers={}, timeout=30):
|
||||||
ovrdrv_id = identifiers.get('overdrive', None)
|
ovrdrv_id = identifiers.get('overdrive', None)
|
||||||
@ -78,7 +74,7 @@ class OverDrive(Source):
|
|||||||
if ovrdrv_id is None:
|
if ovrdrv_id is None:
|
||||||
ovrdrv_id = ovrdrv_data[7]
|
ovrdrv_id = ovrdrv_data[7]
|
||||||
|
|
||||||
if get_full_metadata():
|
if self.prefs['get_full_metadata']:
|
||||||
self.get_book_detail(br, ovrdrv_data[1], mi, ovrdrv_id, log)
|
self.get_book_detail(br, ovrdrv_data[1], mi, ovrdrv_id, log)
|
||||||
|
|
||||||
if isbn is not None:
|
if isbn is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user