Fix the OPDS stream to handle custom ROOT prefix

As we render the entry's xml in a separated steps, we need to pass the
rootLocation to all the internal rendering.

Testing with and without root is not so easy.
I've simply made all server tests using a ROOT prefix.
We can assume that if the ROOT is present everywhere we need it, it will not
when we don't need. (As long as we don't hardcode "ROOT" in the server.)
This commit is contained in:
Matthieu Gautier
2021-11-17 15:13:21 +01:00
parent 22e5327dcf
commit 66c40817ee
3 changed files with 132 additions and 130 deletions

View File

@ -16,9 +16,9 @@
<articleCount>{{article_count}}</articleCount>
<mediaCount>{{media_count}}</mediaCount>
{{#icons}}<link rel="http://opds-spec.org/image/thumbnail"
href="/meta?name=Illustration_{{icon_width}}x{{icon_height}}@{{icon_scale}}&amp;content={{{content_id}}}"
href="{{root}}/meta?name=Illustration_{{icon_width}}x{{icon_height}}@{{icon_scale}}&amp;content={{{content_id}}}"
type="image/png;width={{icon_width}};height={{icon_height}};scale={{icon_scale}}"/>
{{/icons}}<link type="text/html" href="/{{{content_id}}}" />
{{/icons}}<link type="text/html" href="{{root}}/{{{content_id}}}" />
<author>
<name>{{author_name}}</name>
</author>