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

Feature Request - Display music details if music is playing #846

Closed
6 tasks done
aidenmitchell opened this issue Sep 12, 2019 · 7 comments
Closed
6 tasks done

Feature Request - Display music details if music is playing #846

aidenmitchell opened this issue Sep 12, 2019 · 7 comments
Labels

Comments

@aidenmitchell
Copy link
Contributor

aidenmitchell commented Sep 12, 2019

General troubleshooting tips

Before logging an issue please check that:

If none of this fixes your issue, tell us about the problem you are experiencing or the feature you'd like to request.

Required information

In order to help us sort your issue, we ask that you provide the following information:

  • Mac model: iMac 21.5" Late 2012
  • macOS version: MacOS Mojave 10.14.6
  • Monitor setup: 1 monitor

If appropriate, please enable Debug mode and Log to disk in Advanced tab and replicate your bug, then attach the AerialLog.txt file (You can access this file through the Advanced tab).

Description of issue / Feature request

It'd be cool if on the screensaver, above the video description, the name and artist of the current song playing on my Mac could show up. I use Spotify, but iTunes would be good to add too.

@glouel
Copy link
Collaborator

glouel commented Sep 12, 2019

Hey @ilovecats516

That's pretty cool idea indeed ! I had a quick check and it looked simple enough... but Catalina being the killjoy it is for screen saver makes it impossible.

It's very easy to get currently playing song via AppleScript for Spotify, iTunes or Music (found this here for Spotify : https://stackoverflow.com/a/46325321 and this for iTunes/music : https://apple.stackexchange.com/questions/297240/getting-the-file-path-of-a-currently-playing- ).

The problem is, AppleScript is being clamped down massively since Mojave (more info here if interested : https://www.felix-schwarz.org/blog/2018/08/new-apple-event-apis-in-macos-mojave), for an app to be allowed to use it, you need to ask for entitlements. In the "debug app" that I use to develop Aerial, after much fiddling, that indeed works, you get prompted like this :

Capture d’écran 2019-09-12 à 14 15 57

Then I can read the info :

Capture d’écran 2019-09-12 à 14 17 53

Now the sad part, in order to get this to work you need a temporary entitlement called com.apple.security.temporary-exception.apple-events. If you make an "app", you can ask for this yourself. But Aerial is a screen saver (.saver file extension) a system plugin that's run by another app (in Catalina, /System/Library/Frameworks/ScreenSaver.framework/PlugIn/legacyScreenSaver.appex) and it is its entitlements that dictates what all 3rd party screen savers (including Aerial) can do (macOS first party screen savers can have their own entitlements, but we can't !). And just like reading external drives, writing outside the sandbox container, or accessing the keyboard (see the pinned Catalina issue for more info), it lacks the apple-events entitlement too.

So, as much as I'd like to add this, right now it doesn't look possible. We'll have to see if things change when Catalina gets released but right now they are in a pretty bad place for those kind of "advanced features" !

@aidenmitchell
Copy link
Contributor Author

aidenmitchell commented Sep 14, 2019

That's too bad it won't work come Catalina. Hopefully, there will be a workaround, or Apple will loosen their security a tad. Thanks anyway, and what a fast response. I'm glad Aerial is active and that developers actually respond to issues and suggestions.

@glouel
Copy link
Collaborator

glouel commented Jul 2, 2021

Time passed a bit, but 2.3.4beta3 includes both Apple Music and Spotify integration ;)

Capture d’écran 2021-07-02 à 18 27 53

@Pcar17
Copy link

Pcar17 commented Jul 5, 2021

@glouel,

This is a great idea! However, I'm not seeing the Apple Music track that's playing showing up on an M1 MBA running macOS 11.4 (20F71) running the latest build, 2.3.4beta3.

Is there anything that I have to do in order to activate it besides "enabling" it? Or anything I should do to diagnose?

Thanks!

@glouel
Copy link
Collaborator

glouel commented Jul 5, 2021

@Pcar17
The track that plays when Aerial starts will not show up, but if you press next on your keyboard (that doesn't interrupt the screensaver) the track change should be detected. If it's not let met know I'll try to investigate, thanks !

@Pcar17
Copy link

Pcar17 commented Jul 5, 2021

@glouel,

Wow....what too you so long to respond! Maybe 15 seconds?

lol!

But, yes, that was it. It works perfectly. What a nice feature!

@glouel
Copy link
Collaborator

glouel commented Jul 5, 2021

Haha I just had the notification and was around ;)

Check here for more info on the current limitations and what will change : https://ko-fi.com/post/Apple-Music-and-Spotify-integration-W7W056GL2

@glouel glouel closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants