diff --git a/cps/__init__.py b/cps/__init__.py index 5d870bf6e..c41509424 100644 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -64,8 +64,8 @@ mimetypes.add_type('application/x-cbr', '.cbr') mimetypes.add_type('application/x-cbz', '.cbz') mimetypes.add_type('application/x-tar', '.cbt') mimetypes.add_type('application/x-7z-compressed', '.cb7') -mimetypes.add_type('image/vnd.djv', '.djv') -mimetypes.add_type('image/vnd.djv', '.djvu') +mimetypes.add_type('image/vnd.djvu', '.djv') +mimetypes.add_type('image/vnd.djvu', '.djvu') mimetypes.add_type('application/mpeg', '.mpeg') mimetypes.add_type('audio/mpeg', '.mp3') mimetypes.add_type('audio/x-m4a', '.m4a') diff --git a/cps/db.py b/cps/db.py index 38b3f07fd..c54d3de30 100644 --- a/cps/db.py +++ b/cps/db.py @@ -151,6 +151,8 @@ class Identifiers(Base): return "ISSN" elif format_type == "isfdb": return "ISFDB" + elif format_type == "storygraph": + return "StoryGraph" if format_type == "lubimyczytac": return "Lubimyczytac" if format_type == "databazeknih": @@ -194,6 +196,8 @@ class Identifiers(Base): return "http://www.isfdb.org/cgi-bin/pl.cgi?{0}".format(self.val) elif format_type == "databazeknih": return "https://www.databazeknih.cz/knihy/{0}".format(self.val) + elif format_type == "storygraph": + return "https://app.thestorygraph.com/books/{0}".format(self.val) elif self.val.lower().startswith("javascript:"): return quote(self.val) elif self.val.lower().startswith("data:"): @@ -901,7 +905,8 @@ class CalibreDB: results = self.session.query(Authors).filter(Authors.sort == auth).all() # ToDo: How to handle not found author name if not len(results): - log.error("Author {} not found to display name in right order".format(auth)) + book_id = entry.id if isinstance(entry, Books) else entry[0].id + log.error("Author '{}' of book {} not found to display name in right order".format(auth, book_id)) # error = True break for r in results: diff --git a/cps/services/worker.py b/cps/services/worker.py index dce3da797..2a0809cab 100644 --- a/cps/services/worker.py +++ b/cps/services/worker.py @@ -199,7 +199,7 @@ class CalibreTask: self.run(*args) except Exception as ex: self._handleError(str(ex)) - log.error_or_exception(ex) + log.exception(ex) self.end_time = datetime.now() diff --git a/cps/static/css/main.css b/cps/static/css/main.css index 3afaf7a5d..571f546c9 100644 --- a/cps/static/css/main.css +++ b/cps/static/css/main.css @@ -511,12 +511,12 @@ input:-moz-placeholder { color: #454545; } position: fixed; top: 50%; left: 50%; - width: 630px; + transform: translate(-50%, -50%); + width: 100vw; height: auto; + max-width: 630px; z-index: 2000; visibility: hidden; - margin-left: -320px; - margin-top: -160px; } .overlay { diff --git a/cps/templates/config_db.html b/cps/templates/config_db.html index d1602cf85..c74bfee13 100644 --- a/cps/templates/config_db.html +++ b/cps/templates/config_db.html @@ -62,7 +62,7 @@ {% endif %} {% endif %}