Page 1 of 1

Album Art Folder

PostPosted: Sat Feb 01, 2020 10:45 pm
by hdfreak
Hey All,

Trying to link album art to a control page. The Sonos plugin creates a "sonos" folder under "/Library/Application Support/Perceptive Automation/images" but never populates it with any files. If I delete the folder, it puts it right back upon the first play action.

Using the latest plugin (1.0.16).

Thanks,
Brian

Re: Album Art Folder

PostPosted: Sat Feb 22, 2020 11:20 am
by DaveL17
Sorry - meant to reply to this a long time ago, but it slipped through the cracks. Cover art is populated to that location, but it's not always populated. For example, when I'm playing music from my iTunes library, the cover art file is populated. This URI is placed in the ZP_ART state:

Screen Shot 2020-02-22 at 11.01.44 AM.png
Screen Shot 2020-02-22 at 11.01.44 AM.png (74.87 KiB) Viewed 4893 times


When I'm playing something from Pandora, the cover art file is not populated. When Pandora is playing, the ZP_ART state is empty, but I can see a reference to the mp3 file in the ZP_CurrentTrackURI state (I suspect the cover art is embedded in the referenced mp3 file, but the plugin may not have access to it). In its place, the plugin uses a placeholder image that it ships with:

Screen Shot 2020-02-22 at 11.07.35 AM.png
Screen Shot 2020-02-22 at 11.07.35 AM.png (27.96 KiB) Viewed 4893 times


To display the image file (when it's available), display it as a refreshing image URL with the following structure (note that spaces have been replaced by '%20':
Code: Select all
file:///Library/Application%20Support/Perceptive%20Automation/images/Sonos/Workshop_art.jpg

I have had it on my to-do list to see if I can find a way to get the Pandora cover art to display, but it's never boiled to the top of the list for me. Maybe someone else has figured this out by now. I don't know this as fact, but it could be that changes to the Sonos API have broken something, because I could swear that I've been able to display Pandora cover art in the past.

Re: Album Art Folder

PostPosted: Wed Feb 26, 2020 2:13 pm
by mundmc
Same here- I KNOW I have seen Pandora cover art in the past. I briefly looked at the lastfm api for searching for cover art based on album and band names, and it seemed doable.

Re: Album Art Folder

PostPosted: Sat Mar 28, 2020 9:49 am
by nlagaros
I just did some testing with Pandora and the album art appears to be working. Are you still having this issue?

mundmc wrote:
Same here- I KNOW I have seen Pandora cover art in the past. I briefly looked at the lastfm api for searching for cover art based on album and band names, and it seemed doable.

Re: Album Art Folder

PostPosted: Sat Mar 28, 2020 11:09 am
by mundmc
nlagaros wrote:
I just did some testing with Pandora and the album art appears to be working. Are you still having this issue?

mundmc wrote:
Same here- I KNOW I have seen Pandora cover art in the past. I briefly looked at the lastfm api for searching for cover art based on album and band names, and it seemed doable.
Hi Nick- I am! Any specific log stuff you would like to see?

Re: Album Art Folder

PostPosted: Sat Mar 28, 2020 1:11 pm
by jltnol
as a side question, is this refreshing image available in iTunes?

Re: Album Art Folder

PostPosted: Sun Mar 29, 2020 6:33 am
by DaveL17
nlagaros wrote:
I just did some testing with Pandora and the album art appears to be working. Are you still having this issue?

Hey Nick. I just updated to the latest version and Pandora cover art now works for me. Thanks for continuing to support this awesome plugin.

As a side note, I still get "unable to reach the version server" errors upon startup, which I suspect is a result of not being able to reach the URL specified in __init__. So what I've done is comment out the following lines to silence the errors.

plugin.py
25
35
62

Sonos.py
289
372

Could you knock those out permanently in a future version? Thanks!

Re: Album Art Folder

PostPosted: Mon Mar 30, 2020 3:34 pm
by nlagaros
Can you try the latest version of the plugin and see if this issue still persists. If so, let's look at the XML messages coming in when you switch to a Pandora station. That should give us some clue. Thanks.

mundmc wrote:
nlagaros wrote:
I just did some testing with Pandora and the album art appears to be working. Are you still having this issue?

mundmc wrote:
Same here- I KNOW I have seen Pandora cover art in the past. I briefly looked at the lastfm api for searching for cover art based on album and band names, and it seemed doable.
Hi Nick- I am! Any specific log stuff you would like to see?

Re: Album Art Folder

PostPosted: Mon Mar 30, 2020 9:57 pm
by mundmc
nlagaros wrote:
Can you try the latest version of the plugin and see if this issue still persists. If so, let's look at the XML messages coming in when you switch to a Pandora station. That should give us some clue. Thanks.

mundmc wrote:
nlagaros wrote:
I just did some testing with Pandora and the album art appears to be working. Are you still having this issue?

mundmc wrote:
Same here- I KNOW I have seen Pandora cover art in the past. I briefly looked at the lastfm api for searching for cover art based on album and band names, and it seemed doable.
Hi Nick- I am! Any specific log stuff you would like to see?
Thanks Nick- I didn’t realize I wasn’t on 1.0.17 (i had 1.0.16)!

That did the trick, and thanks again for making an essential part of my family’s HA experience :)

Image

Re: Album Art Folder

PostPosted: Thu Nov 18, 2021 4:45 pm
by CBowles
Hi Nick,

Firstly, many thanks for your great plugin!
I'm looking to create a new Control Page for my Sonos devices and would like to have album art shown for both the current track AND the next track.
The current track is no issue as the plugin creates the folder and copies the image there.
However, I'm getting stuck with a blocker on the artwork for the next track as that is not copied.

Looking at the states, ZP_ART = http://10.0.1.101:1400/getaa?s=1&u=x-so ... 8%26sn%3d4
but ZP_NART = /getaa?s=1&u=x-sonos-http%3atrack%252f65614122.flac%3fsid%3d174%26flags%3d24608%26sn%3d4

As you can see, the ZP_NART seems to be missing the IP and port before the "/getaa?s"
Is there anyway you could update the plugin to provide the complete URL for the ZP_NART value?
While you're at it, could you also add a function that copies the next track's artwork to <zp_name>_nart.jpg ? :wink:

Cheers,

Chris
--

Re: Album Art Folder

PostPosted: Fri Nov 19, 2021 5:32 pm
by ryanbuckner
CBowles wrote:
Hi Nick,

Firstly, many thanks for your great plugin!
I'm looking to create a new Control Page for my Sonos devices and would like to have album art shown for both the current track AND the next track.
The current track is no issue as the plugin creates the folder and copies the image there.
However, I'm getting stuck with a blocker on the artwork for the next track as that is not copied.

Looking at the states, ZP_ART = http://10.0.1.101:1400/getaa?s=1&u=x-so ... 8%26sn%3d4
but ZP_NART = /getaa?s=1&u=x-sonos-http%3atrack%252f65614122.flac%3fsid%3d174%26flags%3d24608%26sn%3d4

As you can see, the ZP_NART seems to be missing the IP and port before the "/getaa?s"
Is there anyway you could update the plugin to provide the complete URL for the ZP_NART value?
While you're at it, could you also add a function that copies the next track's artwork to <zp_name>_nart.jpg ? :wink:

Cheers,

Chris
--


As a workaround you could create a trigger that updates a variable for this. The same trigger could move the artwork for you.

Re: Album Art Folder

PostPosted: Thu Feb 03, 2022 9:08 am
by CBowles
Hey Ryan,

Thanks for the suggestion and I had considered this workaround but my coding/scripting skills aren't up to the job of creating a variable that inserts the first part (http://10.0.1.101:1400/) before the ZP_NART device status that is the rest of the URL for the artwork.
If anyone could give any hints as to how to get this working, creating a trigger would be the easy bit ;-)

Chris
--

Re: Album Art Folder

PostPosted: Thu Feb 03, 2022 11:43 am
by ryanbuckner
CBowles wrote:
Hey Ryan,

Thanks for the suggestion and I had considered this workaround but my coding/scripting skills aren't up to the job of creating a variable that inserts the first part (http://10.0.1.101:1400/) before the ZP_NART device status that is the rest of the URL for the artwork.
If anyone could give any hints as to how to get this working, creating a trigger would be the easy bit ;-)

Chris
--


you can use something like this in a trigger on any change. You can simplify the number of steps. I'm doing it step by step to show you:

Code: Select all
url_base = "http://10.0.1.101:1400"
dev = indigo.devices[322223882] #replace this number with the ID of your SONOS device
new_url = url_base + dev.states["ZP_NART"]
indigo.variable.updateValue(1654952787, value=new_url). #replace this number with the ID of the variable where you want to store this new URL

Re: Album Art Folder

PostPosted: Mon Feb 07, 2022 4:28 am
by CBowles
Hey Ryan,

Thanks for the pointers, it worked a treat!
Hopefully the dev of the plugin will update it soon to get the full URL read out for the Next Artwork ;-)

Thanks again!

Chris
--