mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 19:01:40 +00:00
navidrome cover art workaround
This commit is contained in:
parent
a8fb7ff11e
commit
39c714a137
8 changed files with 110 additions and 8 deletions
|
|
@ -242,6 +242,26 @@ export const NavidromeController: ControllerEndpoint = {
|
|||
apiClientProps.server,
|
||||
);
|
||||
},
|
||||
getAlbumInfo: async (args) => {
|
||||
const { query, apiClientProps } = args;
|
||||
|
||||
const albumInfo = await ssApiClient(apiClientProps).getAlbumInfo2({
|
||||
query: {
|
||||
id: query.id,
|
||||
},
|
||||
});
|
||||
|
||||
if (albumInfo.status !== 200) {
|
||||
throw new Error('Failed to get album info');
|
||||
}
|
||||
|
||||
const info = albumInfo.body.albumInfo;
|
||||
|
||||
return {
|
||||
imageUrl: info.largeImageUrl || info.mediumImageUrl || info.smallImageUrl || null,
|
||||
notes: info.notes || null,
|
||||
};
|
||||
},
|
||||
getAlbumList: async (args) => {
|
||||
const { query, apiClientProps } = args;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue