1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-24 18:47:23 +00:00

fix #513 OPDS updated date format invalid per Atom specification

replace space separating date from time with 'T'
This commit is contained in:
Eric Le Lay 2018-05-26 17:21:20 +02:00
parent 9867959916
commit 513355e2e5
2 changed files with 5 additions and 2 deletions

View File

@ -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'

View File

@ -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 %}