File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -234,18 +234,18 @@ while [ $# -gt 0 ]; do
234234
235235 results=$( \
236236 curl -s -G $SPOTIFY_SEARCH_API --data-urlencode " q=$Q " -d " type=playlist&limit=10&offset=0" -H " Accept: application/json" -H " Authorization: Bearer ${SPOTIFY_ACCESS_TOKEN} " \
237- | grep -E -o " spotify:user:[a-zA-Z0-9_]+: playlist:[a-zA-Z0-9]+" -m 10 \
237+ | grep -E -o " spotify:playlist:[a-zA-Z0-9]+" -m 10 \
238238 )
239239
240240 count=$( \
241- echo " $results " | grep -c " spotify:user " \
241+ echo " $results " | grep -c " spotify:playlist " \
242242 )
243243
244244 if [ " $count " -gt 0 ]; then
245245 random=$(( $RANDOM % $count )) ;
246246
247247 SPOTIFY_PLAY_URI=$( \
248- echo " $results " | awk -v random=" $random " ' /spotify:user:[a-zA-Z0-9]+: playlist:[a-zA-Z0-9]+/{i++}i==random{print; exit}' \
248+ echo " $results " | awk -v random=" $random " ' /spotify:playlist:[a-zA-Z0-9]+/{i++}i==random{print; exit}' \
249249 )
250250 fi ;;
251251
You can’t perform that action at this time.
0 commit comments