diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index ce964e0104..3ccc07040b 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -507,7 +507,7 @@ from calibre.devices.kobo.driver import KOBO from calibre.devices.bambook.driver import BAMBOOK from calibre.ebooks.metadata.fetch import GoogleBooks, ISBNDB, Amazon, \ - LibraryThing + KentDistrictLibrary from calibre.ebooks.metadata.douban import DoubanBooks from calibre.ebooks.metadata.nicebooks import NiceBooks, NiceBooksCovers from calibre.ebooks.metadata.covers import OpenLibraryCovers, \ @@ -517,7 +517,7 @@ from calibre.ebooks.epub.fix.unmanifested import Unmanifested from calibre.ebooks.epub.fix.epubcheck import Epubcheck plugins = [HTML2ZIP, PML2PMLZ, ArchiveExtract, GoogleBooks, ISBNDB, Amazon, - LibraryThing, DoubanBooks, NiceBooks, CSV_XML, EPUB_MOBI, BIBTEX, Unmanifested, + KentDistrictLibrary, DoubanBooks, NiceBooks, CSV_XML, EPUB_MOBI, BIBTEX, Unmanifested, Epubcheck, OpenLibraryCovers, LibraryThingCovers, DoubanCovers, NiceBooksCovers] plugins += [ diff --git a/src/calibre/ebooks/metadata/fetch.py b/src/calibre/ebooks/metadata/fetch.py index bd8d96a399..4f246b2b9a 100644 --- a/src/calibre/ebooks/metadata/fetch.py +++ b/src/calibre/ebooks/metadata/fetch.py @@ -247,30 +247,24 @@ class Amazon(MetadataSource): # {{{ # }}} -class LibraryThing(MetadataSource): # {{{ +class KentDistrictLibrary(MetadataSource): # {{{ - name = 'LibraryThing' + name = 'Kent District Library' metadata_type = 'social' - description = _('Downloads series/covers/rating information from librarything.com') + description = _('Downloads series information from ww2.kdl.org') def fetch(self): - if not self.isbn or not self.site_customization: + if not self.title or not self.book_author: return - from calibre.ebooks.metadata.library_thing import get_social_metadata - un, _, pw = self.site_customization.partition(':') + from calibre.ebooks.metadata.kdl import get_series try: - self.results = get_social_metadata(self.title, self.book_author, - self.publisher, self.isbn, username=un, password=pw) + self.results = get_series(self.title, self.book_author) except Exception, e: + import traceback + traceback.print_exc() self.exception = e self.tb = traceback.format_exc() - @property - def string_customization_help(self): - ans = _('To use librarything.com you must sign up for a %sfree account%s ' - 'and enter your username and password separated by a : below.') - return '
'+ans%('', '')
-
# }}}
diff --git a/src/calibre/ebooks/metadata/kdl.py b/src/calibre/ebooks/metadata/kdl.py
new file mode 100644
index 0000000000..4eca49ad45
--- /dev/null
+++ b/src/calibre/ebooks/metadata/kdl.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
+
+__license__ = 'GPL v3'
+__copyright__ = '2011, Kovid Goyal