Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
513355e2
Commit
513355e2
authored
May 26, 2018
by
Eric Le Lay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #513 OPDS updated date format invalid per Atom specification
replace space separating date from time with 'T'
parent
98679599
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
db.py
cps/db.py
+3
-0
feed.xml
cps/templates/feed.xml
+2
-2
No files found.
cps/db.py
View file @
513355e2
...
@@ -280,6 +280,9 @@ class Books(Base):
...
@@ -280,6 +280,9 @@ class Books(Base):
self
.
timestamp
,
self
.
pubdate
,
self
.
series_index
,
self
.
timestamp
,
self
.
pubdate
,
self
.
series_index
,
self
.
last_modified
,
self
.
path
,
self
.
has_cover
)
self
.
last_modified
,
self
.
path
,
self
.
has_cover
)
@
property
def
atom_timestamp
(
self
):
return
(
self
.
timestamp
or
''
)
.
replace
(
' '
,
'T'
)
class
Custom_Columns
(
Base
):
class
Custom_Columns
(
Base
):
__tablename__
=
'custom_columns'
__tablename__
=
'custom_columns'
...
...
cps/templates/feed.xml
View file @
513355e2
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<entry>
<entry>
<title>
{{entry.title}}
</title>
<title>
{{entry.title}}
</title>
<id>
{{entry.uuid}}
</id>
<id>
{{entry.uuid}}
</id>
<updated>
{{entry.timestamp}}
</updated>
<updated>
{{entry.
atom_
timestamp}}
</updated>
<author>
<author>
<name>
{{entry.authors[0].name}}
</name>
<name>
{{entry.authors[0].name}}
</name>
</author>
</author>
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
{% endif %}
{% endif %}
{% for format in entry.data %}
{% 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)}}"
<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 %}
{% endfor %}
</entry>
</entry>
{% endfor %}
{% endfor %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment