mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Ability to get albums by genre
This commit is contained in:
13
src/smapi.ts
13
src/smapi.ts
@@ -530,7 +530,18 @@ function bindSmapiSoapServiceToExpress(
|
||||
total,
|
||||
});
|
||||
});
|
||||
default:
|
||||
case "genre":
|
||||
return await musicLibrary.albums({ ...paging, genre: typeId }).then((result) => {
|
||||
const accessToken = accessTokens.mint(authToken);
|
||||
return getMetadataResult({
|
||||
mediaCollection: result.results.map((it) =>
|
||||
album(webAddress, accessToken, it)
|
||||
),
|
||||
index: paging._index,
|
||||
total: result.total,
|
||||
});
|
||||
});
|
||||
default:
|
||||
throw `Unsupported id:${id}`;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user