Skip to content

Commit ed4d7d0

Browse files
committed
updated spotify_add_artist_to_backlog_playlist.sh
1 parent d6b6dc6 commit ed4d7d0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

spotify/spotify_add_artist_to_backlog_playlist.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,21 @@ srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2020
# shellcheck disable=SC1090,SC1091
2121
. "$srcdir/lib/utils.sh"
2222

23+
playlist="Discover Backlog"
24+
2325
# shellcheck disable=SC2034,SC2154
2426
usage_description="
25-
Searches for the top 100 tracks for a given artist and adds them to the \"Discover Backlog\" playlist
27+
Searches for the tracks of a given artist and adds them to the \"$playlist\" playlist
2628
2729
Because Spotify's UI is horrible to try to get all the tracks from the discographies and add them to a playlist manually
2830
29-
To increase the number of tracks:
31+
By defaults limits to 1000 tracks, which should cover all of the artist's work
32+
33+
If you need to change this limit, set:
34+
35+
export SPOTIFY_SEARCH_LIMIT=5000
3036
31-
export SPOTIFY_SEARCH_LIMIT=200
37+
Expects the \"$playlist\" playlist to already exist
3238
3339
Uses adjacent scripts:
3440
@@ -47,8 +53,8 @@ num_args 1 "$@"
4753

4854
artist="$1"
4955

50-
export SPOTIFY_SEARCH_LIMIT="${SPOTIFY_SEARCH_LIMIT:-100}"
56+
export SPOTIFY_SEARCH_LIMIT="${SPOTIFY_SEARCH_LIMIT:-1000}"
5157

5258
"$srcdir/spotify_search_uri.sh" artist:"$artist" |
5359
tee >("$srcdir/spotify_uri_to_name.sh") |
54-
"$srcdir/spotify_add_to_playlist.sh" "Discover Backlog"
60+
"$srcdir/spotify_add_to_playlist.sh" "$playlist"

0 commit comments

Comments
 (0)