We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 810a423 commit 3740cf3Copy full SHA for 3740cf3
spotify/spotify_playlist_id_to_name.sh
@@ -51,8 +51,11 @@ playlist_id_to_name(){
51
shift || :
52
# if it's not a playlist id, scan all playlists and take the ID of the first matching playlist name
53
if is_spotify_playlist_id "$playlist_id"; then
54
- playlist_name="$("$srcdir/spotify_api.sh" "/v1/playlists/$playlist_id" "$@" |
55
- jq -r '.name' || :)"
+ playlist_name="$(
+ "$srcdir/spotify_api.sh" "/v1/playlists/$playlist_id" "$@" |
56
+ jq -r '.name' |
57
+ sed 's/[[:space:]]*$//' || :
58
+ )"
59
# it turns out a playlist name can be blank :-/
60
#if is_blank "$playlist_name" || [ "$playlist_name" = null ]; then
61
if is_blank "$playlist_name"; then
0 commit comments