Deprecate 'artist' image format filter; add 'bio'

This commit is contained in:
patrickkfkan 2022-06-23 19:09:13 +08:00
parent 065a1c1ee0
commit 8e02d3574a
2 changed files with 4 additions and 2 deletions

View File

@ -68,7 +68,9 @@ You don't have to call this function on params passed to `discover()` - they wil
Fetches the list of image formats used in Bandcamp.
- `filter` (optional) - 'artist' or 'album'. If specified, narrows down the result to include only formats applicable to the specified value.
- `filter` (optional) - 'bio' (for artist / profile-type images)* or 'album'. If specified, narrows down the result to include only formats applicable to the specified value.
> The 'artist' filter value is deprecated. Use 'bio' instead.
### `getImageFormat(idOrName)`

View File

@ -105,7 +105,7 @@ async function getImageFormats(filter = '') {
if (filter === 'album') {
return constants.formats.filter( c => c.name.startsWith('art_') );
}
else if (filter === 'artist') {
else if (filter === 'bio' || filter === 'artist') {
return constants.formats.filter( c => c.name.startsWith('bio_') );
}
else {