I’ve tested it again with a new folder path, and it still works fine for me. You might need to change three paths from the following:
tell application "BetterTouchTool"
set isRunning to is_app_running "Spotify"
if isRunning then
tell application "Spotify"
if player state is playing then
set currentTrack to current track
set artistName to artist of currentTrack
set trackName to name of currentTrack
set albumCoverUrl to artwork url of currentTrack
set albumCoverPath to "/Users/hackettlai/Pictures/test/Spotify_cover.png"
do shell script "curl " & quoted form of albumCoverUrl & " -o " & quoted form of albumCoverPath
else
return " "
end if
end tell
else
set albumCoverUrl to "https://i.imgur.com/qFmcbT0.png"
set albumCoverPath to "/Users/hackettlai/Pictures/test/Spotify_cover.png"
do shell script "curl " & quoted form of albumCoverUrl & " -o " & quoted form of albumCoverPath
return " "
end if
end tell
"/Users/hackettlai/Pictures/test/Spotify_cover.png" <-- this is my local folder
"https://i.imgur.com/qFmcbT0.png" this is my blank png to display as a backup
Okay, so I found that if I first create the folder Pictures/test then the appropriate track image shows in the folder. (I need to study the script more to find out what is causing it to be written there.) But anyway it still doesn't show in my menu:
I double checked all the script code and it's the same as yours (except for the username).
By the way, in this you can see the Like/Unlike button I added. It could also be placed in line with the other buttons, but I didn't feel like changing all the other button positions.
Hey, perhaps you could try one more thing. Set the background image to your local “Spotify_cover.png” again to override my original setting. It may work.
Sorry everyone, I have been working on my Masters the past year so really got distracted from working on Notchify.
I'm delighted to see that people have taken it and developed it though! Awesome work! I'll edit the original post and preset to match these developments. Apologies for abandoning the project for so long.
Work with Spotify and YouTube(on Safari) running at the same time
For "Play/Pause," "Next Track," and "Previous Track," they should only control the currently playing media. If both YouTube and Spotify are playing simultaneously, both media will be affected at the same time.
For "album cover," "track title," "artist," and "track position," if both media are playing, no data will be displayed, except for a custom message and a blank cover image.
Notes:
Please enable the "Allow JavaScript from Apple Events" on Safari's Developer setting
For the round corner images, please download and replace via HERE
Room for improvement:
You may need to initialize the script by playing something first. I've found that there's a small chance of encountering an error when there is nothing in the global variable. I hope there will be a fix or improvement for this in the future.
The YouTube cover image is in a 16:9 ratio, and I haven't figured out how to display it without stretching it to fit a 1:1 aspect ratio, which causes distortion. I'm looking for some advice on how to address this issue.
Hi, this gadget rules. Thanks to this thread I was able to get album artwork working. However, I've got an issue where a sliver of the art hangs over the bottom of the notch while the menu is closed. (I added the 1px border there to make it more obvious, still sticks out when border is disabled.)
You can't actually see the top rounded edge of the art like you see in the screenshot, that's hidden by the notch. But it sticks out to the bottom of the menu bar. I've worked around this by setting the "menu opacity when not hovered" to 0.03--less than that and it won't display. I haven't changed anything else outside of updating the directories in the script.
The corners are also kind of strange--both the top rounding icons work when the menu is visible, but as you can see, they're inconsistent when it's hidden. Top left and bottom right work, bottom left and top right do not. I've tried manually setting them to the linked above in this thread, no luck.
Also: is there a way to make the menu display only after hovering for a certain amount of time? It's easy to accidentally hit it when aiming for a tab right below it. The Hover Activation Delay only affects the time between initial hover and display. I'd like to specify a time before the hover activation will fire, to minimize accidental openings.