2017-01-09 22:18:49 +02:00
|
|
|
{
|
|
|
|
"pubdate": "{{entry.pubdate}}",
|
|
|
|
"title": "{{entry.title}}",
|
|
|
|
"format_metadata": {
|
|
|
|
{% for format in entry.data %}
|
|
|
|
"{{format.format}}": {
|
|
|
|
"mtime": "{{entry.last_modified}}",
|
|
|
|
"size": {{format.uncompressed_size}},
|
2017-01-12 22:03:47 +02:00
|
|
|
"path": ""
|
2017-01-09 22:18:49 +02:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
},
|
|
|
|
"formats": [
|
|
|
|
{% for format in entry.data %}
|
|
|
|
"{{format.format}}"{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
],
|
|
|
|
"series": null,
|
|
|
|
"cover": "/opds/cover/{{entry.id}}",
|
|
|
|
"languages": [
|
|
|
|
{% for lang in entry.languages %}
|
|
|
|
"{{lang.lang_code}}"{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
],
|
2017-01-14 14:18:35 +02:00
|
|
|
"comments": "{% if entry.comments|length > 0 %}{{entry.comments[0].text.replace('"', '\\"')|safe}}{% endif %}",
|
2017-01-09 22:18:49 +02:00
|
|
|
"tags": [
|
|
|
|
{% for tag in entry.tags %}
|
|
|
|
"{{tag.name}}"{% if not loop.last %},{% endif %}
|
|
|
|
{% 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": "/opds/cover/{{entry.id}}",
|
|
|
|
"main_format": {
|
2017-01-12 22:03:47 +02:00
|
|
|
"{{entry.data[0].format|lower}}": "/download/{{entry.id}}/{{entry.data[0].format|lower}}"
|
|
|
|
},
|
2017-01-14 14:18:35 +02:00
|
|
|
"rating":{% if entry.ratings.__len__() > 0 %} "{{entry.ratings[0].rating}}.0"{% else %}0.0{% endif %},
|
2017-01-09 22:18:49 +02:00
|
|
|
"authors": [
|
|
|
|
{% for author in entry.authors %}
|
|
|
|
"{{author.name}}"{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
],
|
2017-01-14 14:18:35 +02:00
|
|
|
"other_formats": {
|
|
|
|
{% if entry.data.__len__() > 1 %}
|
|
|
|
{% for format in entry.data[1:] %}
|
|
|
|
"{{format.format|lower}}": "/download/{{entry.id}}/{{format.format|lower}}"{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %} },
|
2017-01-09 22:18:49 +02:00
|
|
|
"title_sort": "{{entry.sort}}"
|
|
|
|
}
|