Without going into a ton of detail, I have a small little thing I was wondering could be glanced at in the library server. To make a long story short, I've recently returned to developing a custom Flash interface to my home automation / media control. Data regarding Playing Now, Playlists, etc. are delivered to the interface by way of my home automation software through the MC Automation Interface through a polled-delta XML feed. Anywho...
On my main Flash interface screen for Now Playing, I display the usual suspects... Track/Artist/Album/etc in addition to the Artist/Track Name of the next five items in Playing Now. This has been working beautifully for the few weeks of testing. I can move a track up/down in the "Next Up" list, remove tracks, add tracks into the "Next Up" list (queue) all from this interface. All works great.... except one minor tiny part...
The current way I am retrivieving cover art to display is through the library server, executing a simple http request like this:
http://libraryserver/GetArt?Key=XXXXXXNow, this does return applicable cover art... well, sometimes. Realize that I am displaying cover art for the actual track now playing, in addition to the next five in the now playing playlist. When the interface receives an XML update to any of the tracks displayed (either cause of a track change or rearrange or whatever), it updates the cover art appropriately.
Here is the problem I'm experiencing...
If my interface makes a request for all (in this case six) pieces of cover art at the same time (which usually happens after a complete playlist change), MC responds back with most of the six correctly, however some are sometimes either one of two things...1) Completely Broken -- i.e. the JPG is only partially sent, so the covert art just stops at some point and rest of the square is just gray... or (even more strange)...
2) Sends Completely Wrong Cover Art -- This one is funky because it's not just a random piece of cover art... instead, it is actually cover art for one of the other tracks that was requested.
Take this example, where my interface all the sudden needs cover art for track A,B,C,D,E,F. If all of these are requested at once, MC might respond like this (just an example):
A
B
C (Broken JPG)
A (Notice I needed art for track D, but MC gave me art for A again for some reason).
E
F
I know this is so trival, but I've tested it many times, and even sniffed the actual packets and that is exactly what MC is responding with, even though the requests are valid (and even MC's library server shows the correct requests for the appropriate art in it's log). Also please note, that as a track changes, so that everything is essentially just shifting up one (so, say a new track will appear under F), my interface only requests this newest piece of art and MC always responds correctly and continues to from that point on. Like I said, it's only when all these requests hit the library server at once. It's almost as if the library server gets a little confused about which piece of art is actually supposed to deliver, sometimes even mid-stream (delivery).
Anywho, I know the library server was probably never supposed to be used this way, but, hey... it works, sorta... :-) I can probably find some kind of work-around, like dumping all the cover art back out somewhere, but I like keeping things neat and tidy.
This is just what you guys get for giving us a product that is so ** flexible...
Love me some MC!