Commit 513355e2 authored by Eric Le Lay's avatar Eric Le Lay

fix #513 OPDS updated date format invalid per Atom specification

replace space separating date from time with 'T'
parent 98679599
......@@ -280,6 +280,9 @@ class Books(Base):
self.timestamp, self.pubdate, self.series_index,
self.last_modified, self.path, self.has_cover)
@property
def atom_timestamp(self):
return (self.timestamp or '').replace(' ', 'T')
class Custom_Columns(Base):
__tablename__ = 'custom_columns'
......
......@@ -38,7 +38,7 @@
<entry>
<title>{{entry.title}}</title>
<id>{{entry.uuid}}</id>
<updated>{{entry.timestamp}}</updated>
<updated>{{entry.atom_timestamp}}</updated>
<author>
<name>{{entry.authors[0].name}}</name>
</author>
......@@ -55,7 +55,7 @@
{% endif %}
{% for format in entry.data %}
<link rel="http://opds-spec.org/acquisition" href="{{ url_for('get_opds_download_link', book_id=entry.id, book_format=format.format|lower)}}"
length="{{format.uncompressed_size}}" mtime="{{entry.timestamp}}" type="{{format.format|lower|mimetype}}"/>
length="{{format.uncompressed_size}}" mtime="{{entry.atom_timestamp}}" type="{{format.format|lower|mimetype}}"/>
{% endfor %}
</entry>
{% endfor %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment