mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Support Want-OPDS-Catalog HTTP header in content server
This commit is contained in:
parent
50f6de082a
commit
151ffab821
@ -366,10 +366,9 @@ class LibraryServer(object):
|
||||
@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…
x
Reference in New Issue
Block a user