Improvements for OPDS on iOS with Bookari- and Chunky-Reader

This commit is contained in:
OzzieIsaacs
2017-01-07 18:08:12 +01:00
parent 8494cb698c
commit a16321179d
3 changed files with 57 additions and 33 deletions
+13 -11
View File
@@ -3,17 +3,19 @@
<id>urn:uuid:2853dacf-ed79-42f5-8e8a-a7bb3d1ae6a2</id>
<link rel="self"
href="{{url_for('feed_index')}}"
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
type="application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"/>
<link rel="start"
href="{{url_for('feed_index')}}"
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
type="application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"/>
<link rel="up"
href="{{url_for('feed_index')}}"
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
type="application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"/>
{% if pagination.has_next %}
<link rel="next"
title="{{_('Next')}}"
href="{{ next_url }}"
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
type="application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"/>
{% endif %}
<link rel="search"
href="{{url_for('feed_osd')}}"
type="application/opensearchdescription+xml"/>
@@ -30,7 +32,6 @@
<updated>{{entry.timestamp}}</updated>
<author>
<name>{{entry.authors[0].name}}</name>
<uri>{{entry.authors[0].name}}</uri>
</author>
<language>{{entry.language}}</language>
{% for tag in entry.tags %}
@@ -38,17 +39,18 @@
term="{{tag.name}}"
label="{{tag.name}}"/>
{% endfor %}
<summary>{% if entry.comments[0] %}{{entry.comments[0].text|striptags}}{% endif %}</summary>
{% if entry.comments[0] %}<summary>{{entry.comments[0].text|striptags}}</summary>{% endif %}
{% if entry.has_cover %}
<link rel="http://opds-spec.org/image" href="{{ url_for('feed_get_cover', cover_path=entry.path) }}" type="image/jpg"/>
<link rel="http://opds-spec.org/cover" href="{{ url_for('feed_get_cover', cover_path=entry.path) }}" type="image/jpg"/>
<link rel="http://opds-spec.org/image/thumbnail" href="{{ url_for('feed_get_cover', cover_path=entry.path) }}" type="image/jpg"/>
<link type="image/jpeg" href="{{url_for('feed_get_cover', book_id=entry.id)}}" rel="http://opds-spec.org/image"/>
<link type="image/jpeg" href="{{url_for('feed_get_cover', book_id=entry.id)}}" rel="http://opds-spec.org/image/thumbnail"/>
{% endif %}
{% for format in entry.data %}
<link rel="http://opds-spec.org/acquisition" href="{{ url_for('get_opds_download_link', book_id=entry.id, format=format.format|lower)}}"
length="{{format.uncompressed_size}}" mtime="{{entry.timestamp}}"
{% if format.format|lower == "epub" %}
type="application/epub+zip"/>
{% elif format.format|lower == "cbr" %}
type="application/x-cbr"/>
{% else %}
type="application/x-mobipocket-ebook"/>
{% endif %}
@@ -59,7 +61,7 @@
<entry>
<title>{{author.name}}</title>
<id>{{ url_for('feed_author', name=author.name) }}</id>
<link type="application/atom+xml;profile=opds-catalog;type=feed;kind=acquisition" href="{{url_for('feed_author', name=author.name)}}" />
<link type="application/atom+xml;profile=opds-catalog;type=feed;kind=acquisition" href="{{url_for('feed_author', name=author.name)}}"/>
<link type="application/atom+xml" href="{{url_for('feed_author', name=author.name)}}" rel="subsection"/>
</entry>
{% endfor %}
@@ -67,7 +69,7 @@
<entry>
<title>{{entry.name}}</title>
<id>{{ url_for('feed_category', name=entry.name) }}</id>
<link type="application/atom+xml;profile=opds-catalog;type=feed;kind=acquisition" href="{{url_for('feed_category', name=entry.name)}}" />
<link type="application/atom+xml;profile=opds-catalog;type=feed;kind=acquisition" href="{{url_for('feed_category', name=entry.name)}}"/>
<link type="application/atom+xml" href="{{url_for('feed_category', name=entry.name)}}" rel="subsection"/>
</entry>
{% endfor %}