From 8e02d3574a01b5284d6fe9a6ca7de2eda09a238f Mon Sep 17 00:00:00 2001 From: patrickkfkan Date: Thu, 23 Jun 2022 19:09:13 +0800 Subject: [PATCH] Deprecate 'artist' image format filter; add 'bio' --- README.md | 4 +++- lib/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d31684..803ad82 100644 --- a/README.md +++ b/README.md @@ -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)` diff --git a/lib/index.js b/lib/index.js index de71b5f..aeea3c8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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 {