From cb108663fa52a0b3d7cd8809904b409dc9c977b7 Mon Sep 17 00:00:00 2001 From: Victor Jolissaint Date: Wed, 11 Oct 2023 17:20:26 +0200 Subject: [PATCH] Add getCurrentTrackArtworkURL() to spotify extension --- extensions/spotify/spotify.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/extensions/spotify/spotify.lua b/extensions/spotify/spotify.lua index 986ed383e..ab593c72c 100644 --- a/extensions/spotify/spotify.lua +++ b/extensions/spotify/spotify.lua @@ -166,6 +166,20 @@ end function spotify.getCurrentTrack() return tell('name of the current track') end + +--- hs.spotify.getCurrentTrackArtworkURL() +--- Function +--- Gets the artwork URL of the current track +--- +--- Parameters: +--- * None +--- +--- Returns: +--- * A string containing the URL of the artwork for the current track, or nil if an error occurred +function spotify.getCurrentTrackArtworkURL() + return tell('artwork url of current track') +end + --- hs.spotify.getCurrentTrackId() --- Function --- Gets the id of the current track