PDA

View Full Version : Artwork on Jive



James
2007-10-26, 14:29
How does Jive decide which tracks have artwork?

I ask because iTunesUpdate sets artwork for tracks that have downloaded artwork as they're added to the current playlist. It does this by extracting the art from iTunes, saving in a cache and then setting the 'cover' column for the track to the file. This works perfectly in the default web interface.

But in Jive, only the art for tracks that have the files embedded in their tags show up.

I've enabled various debugging options (artwork, cometd, command/queries, sql) and as far as I can tell, it seems that Jive doesn't even request artwork for the other tracks.

But how is this decision made? I can't see any information going to Jive that would allow it to work that out!

James

dean
2007-10-26, 14:33
If the artwork shows up on the web interface then it should show up
in jive. The same mechanism is used.

James
2007-10-26, 14:56
That's not what I'm seeing.

It's actually clearest when looking at 'artwork' logging for a track that has no artwork at all.

The web interface will still issue a request for artwork.

Jive sends no request at all for the same track.

At first I'd though that Jive was somehow caching the art (or lack of) for the tracks, but it re-requests the artwork for the tracks with art tags, so that can't be it?

James

James
2007-10-26, 15:02
Ah I think I found it!
Only the tracks with tagged artwork set the icon-id field in the playerstatus response?
(This is from the Cometd logging)

{
# tied Tie::IxHash
"icon-id" => 10_782,
params => { track_id => 10_782 },
text => "Umbrella ft. Jay-Z\nGood Girl Gone Bad\nRihanna",
},

This track has artwork that I set, but no icon-id...
{
# tied Tie::IxHash
params => { track_id => 10_860 },
text => "Melody Day\nAndorra\nCaribou",
},

James

James
2007-10-27, 01:40
FYI, Jive only gets told there's artwork if the track->album->artwork field is set.

I wasn't doing this in my plugin - fixed now!

James

Fred
2007-10-27, 05:32
The reason it's done that way is for performance: there's a single artwork per album that way, otherwise each album has N atworks (with N equal to the number of tracks in the album).

May not matter much on the web gui, but it does on Jive.

Fred

James
2007-10-28, 04:24
Thanks Fred, I assumed that was the reason.

I'm still having a problem that updates I make to the album object take a while to show up in queries

$album->artwork($track->id())
$album->update()

Is there some caching going on somewhere because I can see that sometimes the Jive queries don't actually run a SQL query to get the details...

James