diff --git a/cps/db.py b/cps/db.py index 1c274baa..7bb4ab7c 100755 --- a/cps/db.py +++ b/cps/db.py @@ -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' diff --git a/cps/templates/feed.xml b/cps/templates/feed.xml index fce047d9..ecdb5f54 100644 --- a/cps/templates/feed.xml +++ b/cps/templates/feed.xml @@ -38,7 +38,7 @@ {{entry.title}} {{entry.uuid}} - {{entry.timestamp}} + {{entry.atom_timestamp}} {{entry.authors[0].name}} @@ -55,7 +55,7 @@ {% endif %} {% for format in entry.data %} + length="{{format.uncompressed_size}}" mtime="{{entry.atom_timestamp}}" type="{{format.format|lower|mimetype}}"/> {% endfor %} {% endfor %}