1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-09-11 15:26:00 +00:00

Merge remote-tracking branch 'identifiers/ebooks_identifier'

This commit is contained in:
Ozzie Isaacs
2025-06-28 14:01:41 +02:00

View File

@@ -103,13 +103,13 @@ class Identifiers(Base):
val = Column(String(collation='NOCASE'), nullable=False) val = Column(String(collation='NOCASE'), nullable=False)
book = Column(Integer, ForeignKey('books.id'), nullable=False) book = Column(Integer, ForeignKey('books.id'), nullable=False)
amazon = { amazon = {
"jp": "co.jp", "jp": "co.jp",
"uk": "co.uk", "uk": "co.uk",
"us": "com", "us": "com",
"au": "com.au", "au": "com.au",
"be": "com.be", "be": "com.be",
"br": "com.br", "br": "com.br",
"tr": "com.tr", "tr": "com.tr",
"mx": "com.mx", "mx": "com.mx",
} }
@@ -153,6 +153,10 @@ class Identifiers(Base):
return "ISFDB" return "ISFDB"
elif format_type == "storygraph": elif format_type == "storygraph":
return "StoryGraph" return "StoryGraph"
elif format_type == "ebooks":
return "eBooks.com"
elif format_type == "smashwords":
return "Smashwords"
if format_type == "lubimyczytac": if format_type == "lubimyczytac":
return "Lubimyczytac" return "Lubimyczytac"
if format_type == "databazeknih": if format_type == "databazeknih":
@@ -198,6 +202,10 @@ class Identifiers(Base):
return "https://www.databazeknih.cz/knihy/{0}".format(self.val) return "https://www.databazeknih.cz/knihy/{0}".format(self.val)
elif format_type == "storygraph": elif format_type == "storygraph":
return "https://app.thestorygraph.com/books/{0}".format(self.val) return "https://app.thestorygraph.com/books/{0}".format(self.val)
elif format_type == "ebooks":
return "https://www.ebooks.com/en-us/book/{0}".format(self.val)
elif format_type == "smashwords":
return "https://www.smashwords.com/books/view/{0}".format(self.val)
elif self.val.lower().startswith("javascript:"): elif self.val.lower().startswith("javascript:"):
return quote(self.val) return quote(self.val)
elif self.val.lower().startswith("data:"): elif self.val.lower().startswith("data:"):