Skip to content

Commit 3f4f330

Browse files
committed
updated spotify_backup_playlist.sh
1 parent 786a10e commit 3f4f330

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spotify/spotify_backup_playlist.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ if liked; then
155155
#mv -f -- "$tmp" "$backup_dir_spotify/$filename"
156156
"$srcdir/spotify_liked_uri_artist_track.sh" |
157157
while read -r uri track; do
158-
if ! validate_spotify_uri "$uri"; then
158+
if ! validate_spotify_uri "$uri" &>/dev/null &&
159+
! is_local_uri "$uri" ; then
159160
die "Invalid Spotify URI returned: '$uri', for track: $track"
160161
fi
161162
echo "$track" >> "$track_tmp"
@@ -261,7 +262,8 @@ else
261262
"$srcdir/spotify_playlist_tracks_uri_artist_track.sh" "$playlist_id" "$@" |
262263
# TODO: consider replacing this with a tee to two streaming commands to avoid so many executions
263264
while read -r uri track; do
264-
if ! validate_spotify_uri "$uri" &>/dev/null; then
265+
if ! validate_spotify_uri "$uri" &>/dev/null &&
266+
! is_local_uri "$uri" ; then
265267
die "Invalid Spotify URI returned: '$uri', for track: $track"
266268
fi
267269
echo "$track" >> "$track_tmp"

0 commit comments

Comments
 (0)