Add PageSize of 30 to presentation map to reduce load when requesting artists (#69)

This commit is contained in:
Simon J
2021-10-27 13:08:12 +11:00
committed by GitHub
parent e58dae5eb9
commit 2d4f201d08
2 changed files with 12 additions and 0 deletions

View File

@@ -281,6 +281,7 @@ function server(
res.type("application/xml").send(`<?xml version="1.0" encoding="utf-8" ?> res.type("application/xml").send(`<?xml version="1.0" encoding="utf-8" ?>
<Presentation> <Presentation>
<BrowseOptions PageSize="30" />
<PresentationMap type="ArtWorkSizeMap"> <PresentationMap type="ArtWorkSizeMap">
<Match> <Match>
<imageSizeMap> <imageSizeMap>

View File

@@ -158,6 +158,17 @@ describe("service config", () => {
); );
} }
it("should have a PageSize of specified", async () => {
const xml = await presentationMapXml();
const pageSize = xpath.select(
`string(/Presentation/BrowseOptions/@PageSize)`,
xml
);
expect(pageSize).toEqual('30');
});
it("should have an ArtWorkSizeMap for all sizes recommended by sonos", async () => { it("should have an ArtWorkSizeMap for all sizes recommended by sonos", async () => {
const xml = await presentationMapXml(); const xml = await presentationMapXml();