mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Searching for tracks displays album
This commit is contained in:
@@ -392,7 +392,7 @@ function bindSmapiSoapServiceToExpress(
|
|||||||
searchResult({
|
searchResult({
|
||||||
count: it.length,
|
count: it.length,
|
||||||
mediaCollection: it.map((aTrack) =>
|
mediaCollection: it.map((aTrack) =>
|
||||||
track(webAddress, accessToken, aTrack)
|
album(webAddress, accessToken, aTrack.album)
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -644,15 +644,7 @@ describe("api", () => {
|
|||||||
});
|
});
|
||||||
expect(result[0]).toEqual(
|
expect(result[0]).toEqual(
|
||||||
searchResult({
|
searchResult({
|
||||||
mediaCollection: tracks.map((it) => {
|
mediaCollection: tracks.map((it) => album(rootUrl, accessToken, it.album)),
|
||||||
const t = track(rootUrl, accessToken, it) as any;
|
|
||||||
t.trackMetadata = {
|
|
||||||
...t.trackMetadata,
|
|
||||||
duration: `${t.trackMetadata.duration}`,
|
|
||||||
trackNumber: `${t.trackMetadata.trackNumber}`,
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}),
|
|
||||||
index: 0,
|
index: 0,
|
||||||
total: 2,
|
total: 2,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user