Closed sfai05 closed 8 years ago
I'm not sure why this would be the case. Feel free to submit a pull request to toggle the plugin's display when it's using Apple Music.
It works for me using Apple Music using El Capitan. @sfai05 can you paste the output of the script that runs in terminal?
also not working on my machine (10.11.2), get the following error in terminal:
54:60: execution error: Can’t make name of «class pTrk» of application "iTunes" into type string. (-1700)
56:62: execution error: Can’t make «class pArt» of «class pTrk» of application "iTunes" into type string. (-1700)
55:61: execution error: Can’t make «class pAlb» of «class pTrk» of application "iTunes" into type string. (-1700)
▶ -
---
Track: | color=#333333
Artist: | color=#333333
Album: | color=#333333
---
Pause | bash=/Users/d060015/Sites/github-apps/bitbar-plugins/Enabled/itunes.10s.sh param1=playpause terminal=false
Previous | bash=/Users/d060015/Sites/github-apps/bitbar-plugins/Enabled/itunes.10s.sh param1=previous terminal=false
Next | bash=/Users/d060015/Sites/github-apps/bitbar-plugins/Enabled/itunes.10s.sh param1=next terminal=false
How can I debug to the root cause?
Can you run the following in Terminal and paste the output please?
osascript -e 'tell application "iTunes" to name of current track'
'
Does this error persist or does it go away? Mine did that for a while and then it disappeared after a few refreshes.
thanks, here you go:
$ osascript -e 'tell application "iTunes" to name of current track'
29:33: execution error: iTunes got an error: Can’t get name of current track. (-1728)
I have to be more precise on that issue. When I listen to a radio station via iTunes tab 'Radio' it works fine. When I choose beats 1 for example, the output is correct:
$ osascript -e 'tell application "iTunes" to name of current track'
Beats 1
The error is only shown when I choose music via 'For, You', 'New', 'Connect' or 'iTunes Store'.
This is a known bug and was submitted to Apple by multiple people. Can't do anything about it unless they fix it.
Closing, as there seems to be nothing we can do.
Note:
$ osascript -e 'tell application "iTunes" to player position as string'
71,499000549316
the player position works with AppleMusic New
etc tabs.
@matryer do you have the radar that has been filed to Apple? It would be helpful to check it something new was done.
This has been fixed in iTunes 12.4
Specifically,
[ { data: '27,024000167847',
exitCode: 0,
cli: 'osascript -e tell application "iTunes" to player position as string' },
{ data: 'Wherever I Go',
exitCode: 0,
cli: 'osascript -e tell application "iTunes" to name of current track as string' },
{ data: 'OneRepublic',
exitCode: 0,
cli: 'osascript -e tell application "iTunes" to artist of current track as string' },
{ data: 'Wherever I Go - Single',
exitCode: 0,
cli: 'osascript -e tell application "iTunes" to album of current track as string' } ]
err data: 39:52:
we have that player position, track name, artist name works properly now from News
and from Music
as well. So now all iTunes tabs are covered, Radio
was working already.
NOTE. About player position
, maybe it's more accurate like
['osascript', '-e', 'tell application "iTunes" to duration of current track as integer']
FAO: (@daturkel) Its not working when listen to Apple Music. I did some research and find it difficult to do that so can we just hide the widget when listen to Apple Music ?