mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 17:35:17 +01:00
Support Want-OPDS-Catalog HTTP header in content server
This commit is contained in:
parent
50f6de082a
commit
151ffab821
1 changed files with 3 additions and 4 deletions
|
|
@ -366,10 +366,9 @@ def library(self, start='0', num='50', sort=None, search=None,
|
|||
@expose
|
||||
def index(self, **kwargs):
|
||||
'The / URL'
|
||||
stanza = cherrypy.request.headers.get('Stanza-Device-Name', 919)
|
||||
if stanza == 919:
|
||||
return self.static('index.html')
|
||||
return self.stanza()
|
||||
want_opds = cherrypy.request.headers.get('Stanza-Device-Name', 919) != \
|
||||
919 or cherrypy.request.headers.get('Want-OPDS-Catalog', 919) != 919
|
||||
return self.stanza() if want_opds else self.static('index.html')
|
||||
|
||||
|
||||
@expose
|
||||
|
|
|
|||
Loading…
Reference in a new issue