diff --git a/cps/helper.py b/cps/helper.py
index f2fe7572..b85a6de7 100644
--- a/cps/helper.py
+++ b/cps/helper.py
@@ -509,7 +509,7 @@ def save_cover(img, book_path):
log.error("Only jpg/jpeg files are supported as coverfile")
return False
- if ub.config.config_use_google_drive:
+ if config.config_use_google_drive:
tmpDir = gettempdir()
if save_cover_from_filestorage(tmpDir, "uploaded_cover.jpg", img) is True:
gd.uploadFileToEbooksFolder(os.path.join(book_path, 'cover.jpg'),
diff --git a/cps/templates/feed.xml b/cps/templates/feed.xml
index e007f71f..473dc2d4 100644
--- a/cps/templates/feed.xml
+++ b/cps/templates/feed.xml
@@ -65,7 +65,7 @@
{% endif %}
{% for format in entry.data %}
-
{% endfor %}
diff --git a/cps/templates/json.txt b/cps/templates/json.txt
index 5f8dffca..db8981d2 100644
--- a/cps/templates/json.txt
+++ b/cps/templates/json.txt
@@ -36,7 +36,7 @@
"timestamp": "{{entry.timestamp}}",
"thumbnail": "{{url_for('opds.feed_get_cover', book_id=entry.id)}}",
"main_format": {
- "{{entry.data[0].format|lower}}": "{{ url_for('web.download_link', book_id=entry.id, book_format=entry.data[0].format|lower)}}"
+ "{{entry.data[0].format|lower}}": "{{ url_for('opds.opds_download_link', book_id=entry.id, book_format=entry.data[0].format|lower)}}"
},
"rating":{% if entry.ratings.__len__() > 0 %} "{{entry.ratings[0].rating}}.0"{% else %}0.0{% endif %},
"authors": [
@@ -47,7 +47,7 @@
"other_formats": {
{% if entry.data.__len__() > 1 %}
{% for format in entry.data[1:] %}
- "{{format.format|lower}}": "{{ url_for('web.download_link', book_id=entry.id, book_format=format.format|lower)}}"{% if not loop.last %},{% endif %}
+ "{{format.format|lower}}": "{{ url_for('opds.opds_download_link', book_id=entry.id, book_format=format.format|lower)}}"{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %} },
"title_sort": "{{entry.sort}}"
diff --git a/cps/web.py b/cps/web.py
index 7529218b..4529286f 100644
--- a/cps/web.py
+++ b/cps/web.py
@@ -947,7 +947,7 @@ def render_read_books(page, are_read, as_xml=False, order=None):
else:
try:
readBooks = db.session.query(db.cc_classes[config.config_read_column])\
- .filter(db.cc_classes[config.config_read_column].value is True).all()
+ .filter(db.cc_classes[config.config_read_column].value == True).all()
readBookIds = [x.book for x in readBooks]
except KeyError:
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)