From 823a4216ad28c31a50a57608ee6f45c6b0482847 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 29 Aug 2018 13:21:08 +0530 Subject: [PATCH] Metadata download: Remove the option to lookup first edition dates as the service used to get the data no longer exists See https://www.oclc.org/developer/news/2018/xid-decommission.en.html --- src/calibre/ebooks/metadata/sources/identify.py | 4 +++- src/calibre/ebooks/metadata/xisbn.py | 5 +++-- src/calibre/gui2/preferences/metadata_sources.py | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/identify.py b/src/calibre/ebooks/metadata/sources/identify.py index b2faf00cef..ba82788009 100644 --- a/src/calibre/ebooks/metadata/sources/identify.py +++ b/src/calibre/ebooks/metadata/sources/identify.py @@ -92,7 +92,9 @@ class ISBNMerge(object): self.isbnless_results = [] self.results = [] self.log = log - self.use_xisbn = True + # The xISBN service has been de-commissioned + # https://www.oclc.org/developer/news/2018/xid-decommission.en.html + self.use_xisbn = False def isbn_in_pool(self, isbn): if isbn: diff --git a/src/calibre/ebooks/metadata/xisbn.py b/src/calibre/ebooks/metadata/xisbn.py index eb655211c9..f7c456822c 100644 --- a/src/calibre/ebooks/metadata/xisbn.py +++ b/src/calibre/ebooks/metadata/xisbn.py @@ -31,6 +31,9 @@ class xISBN(object): return self.isbn_pat.sub('', isbn.upper()) def fetch_data(self, isbn): + # xisbn service has been de-comissioned see + # https://www.oclc.org/developer/news/2018/xid-decommission.en.html + return [] url = self.QUERY%isbn data = browser().open_novisit(url).read() data = json.loads(data) @@ -104,5 +107,3 @@ if __name__ == '__main__': print pprint.pprint(xisbn.get_data(isbn)) print print xisbn.get_associated_isbns(isbn) - - diff --git a/src/calibre/gui2/preferences/metadata_sources.py b/src/calibre/gui2/preferences/metadata_sources.py index 58ac3214a7..aa12a85c00 100644 --- a/src/calibre/gui2/preferences/metadata_sources.py +++ b/src/calibre/gui2/preferences/metadata_sources.py @@ -305,6 +305,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form): r('swap_author_names', msprefs) r('fewer_tags', msprefs) r('find_first_edition_date', msprefs) + self.opt_find_first_edition_date.setVisible(False) r('append_comments', msprefs) self.configure_plugin_button.clicked.connect(self.configure_plugin)