Spotify
Spotify Artwork
Remember that script I posted a while back that exports the currently playing iTunes track's artwork?
Well, this one works with Spotify's desktop app:
tell application "Spotify"
try
if player state is not stopped then
set alb to (get album of current track)
set rawData to (get artwork of current track)
else
return
end if
on error
display dialog "Problem getting track info." buttons {"OK"}
return
end try
end tell
try
set baseLoc to choose folder
on error
return
end try
set newPath to ((baseLoc as text) & (my replaceChars(alb, ":", "_")) & ".tiff") as text
try
set fileRef to (open for access newPath with write permission)
write rawData to fileRef starting at 0
tell me to close access fileRef
on error m number n
log n
log m
try
tell me to close access fileRef
end try
end try
on replaceChars(txt, srch, repl)
set text item delimiters to srch
set item_list to every text item of txt
set text item delimiters to repl
set txt to item_list as string
set text item delimiters to ""
return txt
end replaceChars
Spotify has a pretty basic sdef but you can get some info from the current track, including artwork.