You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parallel-library/cps/templates/json.txt

48 lines
1.5 KiB
Plaintext

{
"pubdate": "{{entry.pubdate}}",
"title": "{{entry.title}}",
"format_metadata": {
{% for format in entry.data %}
"{{format.format}}": {
"mtime": "{{entry.last_modified}}",
"size": {{format.uncompressed_size}},
"path": ""
}{% 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 %}
],
"comments": "{% if entry.comments|length > 0 %}{{entry.comments[0].text|safe}}{% endif %}",
"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": {
"{{entry.data[0].format|lower}}": "/download/{{entry.id}}/{{entry.data[0].format|lower}}"
},
"authors": [
{% for author in entry.authors %}
"{{author.name}}"{% if not loop.last %},{% endif %}
{% endfor %}
],
"other_formats": {},
"title_sort": "{{entry.sort}}"
}