Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getCurrentTrackArtworkURL() to spotify extension #3546

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

vjo
Copy link
Contributor

@vjo vjo commented Oct 11, 2023

Problem

I would love to be able to use track artwork in notification.

Here is a usage example:

  local track = hs.spotify.getCurrentTrack()
  local artist = hs.spotify.getCurrentArtist()
  local url = hs.spotify.getCurrentTrackArtworkURL()
  local image = hs.image.imageFromURL(url)
  hs.notify.new({title=track, subTitle=artist, contentImage=image }):send()

Solution

Introduce getCurrentTrackArtworkURL() function to spotify extension returning the URL of the artwork for the current track.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['pr-fix', 'pr-change', 'pr-feature', 'pr-maintenance']

@cmsj cmsj added the pr-feature Pull Request implementing a feature label Dec 10, 2023
@cmsj cmsj merged commit aad8b59 into Hammerspoon:master Dec 10, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature Pull Request implementing a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants