2017-01-09 21:18:49 +01:00
|
|
|
{
|
2019-02-16 07:23:08 +01:00
|
|
|
"pubdate": "{{entry.pubdate}}",
|
|
|
|
"title": "{{entry.title}}",
|
2017-01-09 21:18:49 +01:00
|
|
|
"format_metadata": {
|
2019-02-16 07:23:08 +01:00
|
|
|
{% for format in entry.data %}
|
2017-01-09 21:18:49 +01:00
|
|
|
"{{format.format}}": {
|
2019-02-16 07:23:08 +01:00
|
|
|
"mtime": "{{entry.last_modified}}",
|
|
|
|
"size": {{format.uncompressed_size}},
|
2017-01-12 21:03:47 +01:00
|
|
|
"path": ""
|
2017-01-09 21:18:49 +01:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
2019-02-16 07:23:08 +01:00
|
|
|
},
|
2017-01-09 21:18:49 +01:00
|
|
|
"formats": [
|
2019-02-16 07:23:08 +01:00
|
|
|
{% for format in entry.data %}
|
2017-01-09 21:18:49 +01:00
|
|
|
"{{format.format}}"{% if not loop.last %},{% endif %}
|
2019-02-16 07:23:08 +01:00
|
|
|
{% endfor %}
|
|
|
|
],
|
|
|
|
"series": null,
|
|
|
|
"cover": "{{url_for('opds.feed_get_cover', book_id=entry.id)}}",
|
2017-01-09 21:18:49 +01:00
|
|
|
"languages": [
|
2019-02-16 07:23:08 +01:00
|
|
|
{% for lang in entry.languages %}
|
2017-01-09 21:18:49 +01:00
|
|
|
"{{lang.lang_code}}"{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
2019-02-16 07:23:08 +01:00
|
|
|
],
|
2017-01-14 13:18:35 +01:00
|
|
|
"comments": "{% if entry.comments|length > 0 %}{{entry.comments[0].text.replace('"', '\\"')|safe}}{% endif %}",
|
2017-01-09 21:18:49 +01:00
|
|
|
"tags": [
|
|
|
|
{% for tag in entry.tags %}
|
|
|
|
"{{tag.name}}"{% if not loop.last %},{% endif %}
|
2019-02-16 07:23:08 +01:00
|
|
|
{% endfor %}
|
|
|
|
],
|
|
|
|
"application_id": {{entry.id}},
|
|
|
|
"series_index": {% if entry.series|length > 0 %}"{{entry.series_index}}"{% else %}null{% endif %},
|
|
|
|
"last_modified": "{{entry.last_modified}}",
|
|
|
|
"author_sort": "{{entry.author_sort}}",
|
|
|
|
"uuid": "{{entry.uuid}}",
|
|
|
|
"timestamp": "{{entry.timestamp}}",
|
|
|
|
"thumbnail": "{{url_for('opds.feed_get_cover', book_id=entry.id)}}",
|
2017-01-09 21:18:49 +01:00
|
|
|
"main_format": {
|
2019-03-16 16:23:40 +01:00
|
|
|
"{{entry.data[0].format|lower}}": "{{ url_for('web.download_link', book_id=entry.id, book_format=entry.data[0].format|lower)}}"
|
2017-01-12 21:03:47 +01:00
|
|
|
},
|
2017-01-14 13:18:35 +01:00
|
|
|
"rating":{% if entry.ratings.__len__() > 0 %} "{{entry.ratings[0].rating}}.0"{% else %}0.0{% endif %},
|
2017-01-09 21:18:49 +01:00
|
|
|
"authors": [
|
|
|
|
{% for author in entry.authors %}
|
2017-09-30 15:24:18 +02:00
|
|
|
"{{author.name.replace('|',',')}}"{% if not loop.last %},{% endif %}
|
2019-02-16 07:23:08 +01:00
|
|
|
{% endfor %}
|
|
|
|
],
|
2017-01-14 13:18:35 +01:00
|
|
|
"other_formats": {
|
|
|
|
{% if entry.data.__len__() > 1 %}
|
|
|
|
{% for format in entry.data[1:] %}
|
2019-03-16 16:23:40 +01:00
|
|
|
"{{format.format|lower}}": "{{ url_for('web.download_link', book_id=entry.id, book_format=format.format|lower)}}"{% if not loop.last %},{% endif %}
|
2017-01-14 13:18:35 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %} },
|
2017-01-09 21:18:49 +01:00
|
|
|
"title_sort": "{{entry.sort}}"
|
2017-09-30 15:24:18 +02:00
|
|
|
}
|