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
33bdc07f
Commit
33bdc07f
authored
Mar 21, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #1845 (ods not working in Moonreader an Librera)
Fix opds search with wrong parameter no longer causes error 500
parent
9c842f18
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
opds.py
cps/opds.py
+1
-1
feed.xml
cps/templates/feed.xml
+4
-4
index.xml
cps/templates/index.xml
+1
-0
No files found.
cps/opds.py
View file @
33bdc07f
...
@@ -94,7 +94,7 @@ def feed_cc_search(query):
...
@@ -94,7 +94,7 @@ def feed_cc_search(query):
@
opds
.
route
(
"/opds/search"
,
methods
=
[
"GET"
])
@
opds
.
route
(
"/opds/search"
,
methods
=
[
"GET"
])
@
requires_basic_auth_if_no_ano
@
requires_basic_auth_if_no_ano
def
feed_normal_search
():
def
feed_normal_search
():
return
feed_search
(
request
.
args
.
get
(
"query"
)
.
strip
())
return
feed_search
(
request
.
args
.
get
(
"query"
,
""
)
.
strip
())
@
opds
.
route
(
"/opds/new"
)
@
opds
.
route
(
"/opds/new"
)
...
...
cps/templates/feed.xml
View file @
33bdc07f
...
@@ -11,18 +11,18 @@
...
@@ -11,18 +11,18 @@
<link
rel=
"up"
<link
rel=
"up"
href=
"{{url_for('opds.feed_index')}}"
href=
"{{url_for('opds.feed_index')}}"
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
{% if pagination.has_prev %}
{% if pagination
and pagination
.has_prev %}
<link
rel=
"first"
<link
rel=
"first"
href=
"{{request.script_root + request.path}}"
href=
"{{request.script_root + request.path}}"
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
{% endif %}
{% endif %}
{% if pagination.has_next %}
{% if pagination
and pagination
.has_next %}
<link
rel=
"next"
<link
rel=
"next"
title=
"{{_('Next')}}"
title=
"{{_('Next')}}"
href=
"{{ request.script_root + request.path }}?offset={{ pagination.next_offset }}"
href=
"{{ request.script_root + request.path }}?offset={{ pagination.next_offset }}"
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
{% endif %}
{% endif %}
{% if pagination.has_prev %}
{% if pagination
and pagination
.has_prev %}
<link
rel=
"previous"
<link
rel=
"previous"
href=
"{{request.script_root + request.path}}?offset={{ pagination.previous_offset }}"
href=
"{{request.script_root + request.path}}?offset={{ pagination.previous_offset }}"
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
type=
"application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"
/>
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<link
rel=
"search"
<link
rel=
"search"
href=
"{{url_for('opds.feed_osd')}}"
href=
"{{url_for('opds.feed_osd')}}"
type=
"application/opensearchdescription+xml"
/>
type=
"application/opensearchdescription+xml"
/>
<
!--link title="{{_('Search')}}" type="application/atom+xml" href="{{url_for('opds.feed_normal_search')}}?query={searchTerms}" rel="search"/--
>
<
link
type=
"application/atom+xml"
rel=
"search"
title=
"{{_('Search')}}"
href=
"{{url_for('opds.feed_cc_search')}}/{searchTerms}"
/
>
<title>
{{instance}}
</title>
<title>
{{instance}}
</title>
<author>
<author>
<name>
{{instance}}
</name>
<name>
{{instance}}
</name>
...
...
cps/templates/index.xml
View file @
33bdc07f
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<link
rel=
"search"
<link
rel=
"search"
href=
"{{url_for('opds.feed_osd')}}"
href=
"{{url_for('opds.feed_osd')}}"
type=
"application/opensearchdescription+xml"
/>
type=
"application/opensearchdescription+xml"
/>
<link
type=
"application/atom+xml"
rel=
"search"
title=
"{{_('Search')}}"
href=
"{{url_for('opds.feed_cc_search')}}/{searchTerms}"
/>
<title>
{{instance}}
</title>
<title>
{{instance}}
</title>
<author>
<author>
<name>
{{instance}}
</name>
<name>
{{instance}}
</name>
...
...
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