bossanova808 wrote: 
> I am actually using the status command (as well as songinfo) - but
> neither seem to be returning the data in question via the CLI.  I don't
> use radio much myself, and I quite like the default pic but if you give
> me an easy solve I am happy to pop it in.
> 

I've never coded in Python, so this approach is probably not an ideal
solution, but this is what I came up with in SqueezePlayer.py to make
the Spotify cover art show. As you might see I send the "status" command
for one track (count) with the tags Kal (K=artwork_url, a=artist,
l=album). 

This actually works pretty well although there's probably a better place
in the code where this "status" command could be called (now it doesn't
show upcoming cover art and upcoming info for spotify tracks). I'm sure
there's also a better way to extract the data from the response than the
one I do. Of course, this also makes four more telnet queries.

So, this is just a quick fix to make Spotify (and perhaps other
streaming services) cover art work. I'd like to try some more stuff out
later but haven't really understood all of your code yet.



Code:
--------------------
    
  def updateCoverArtURLs(self):
  
  coverURLs = []
  
  #print "Playlist is" + str(self.playlist)
  
  #start at this song , end at + 3
  index = int(self.sb.request("playlist index ?"))
  upcomer = index
  end = index + 4
  
  #currently uses the track_id in the url - works well
  #supposed to use the cover_id number but this doesn't work so well...
  for count in range(upcomer,end):
  if(count<len(self.playlist)):
  try:
  statusInfo = self.sb.request("status " + str(count) + " 1 tags:Kal")
  if("artwork_url" in statusInfo):
  statusArtwork = statusInfo.split('artwork_url:')
  statusArtwork = statusArtwork.pop(1)
  statusArtwork = statusArtwork.split(' ')
  statusArtwork = statusArtwork.pop(0)
  coverURL = "http://"; + constants.SERVERHTTPURL + "/" + statusArtwork
  else:
  statusId = statusInfo.split('id:')
  statusId = statusId.pop(1)
  statusId = statusId.split(' ')
  statusId = statusId.pop(0)
  coverURL = "http://"; + constants.SERVERHTTPURL + "/music/" + str(statusId) + 
"/cover.jpg"
  #print self.playlist[count]
  #currentID = self.playlist[count]['id']
  #coverURL = "http://"; + constants.SERVERHTTPURL + "/music/" + str(currentID) 
+ "/cover.jpg"
  #Logger.log ("Appending future cover: " + str(count) + " from " + coverURL)
  coverURLs.append(coverURL)
  except Exception as inst:
  Logger.log("No cover art so appending null string for playlist index " + 
str(count), inst)
  coverURLs.append("")
  
  self.coverURLs = coverURLs
  
--------------------


> RE: your skin - you can't call the artist slideshow with a button (it's
> commented out in the XSqueezeNowPlaying.xml) - that method doesn't work
> anymore.
I think that one is from the original xml file, It was commented out and
I left it like that.

> Won't the visualisation never come up as we're not playing anything via
> XBMC?  You are using the current version right (0.4.5)
It won't show up as long as your not playing anything in the xbmc
player. It's just for a fake visualization where a use could be if you
have the TV input to xbmc and AVR input to a squeezebox player, in that
case you could start streaming something like a low bitrate web radio on
xbmc and the visualization for that stream will be displayed while the
squeezebox player is the music you hear. It's not a very user friendly
solution, nor is it anything but fake visualization, but if you like
visualization - it's at least possible. (I do get alot of "waiting for 
artist.slideshow to exit when I have visualization though, I think
there might be a problem if your playing a track where xbmc knows the
artist and the slideshow script looks for that artist as well as/instead
of the one that is playing on the squeezebox)

Likewise you can play a video stream on xbmc and if you run your script
it will show the video in the background, I like this a lot, mainly to
have live-tv displayed while listening to music and still see cover art
as an overlay to the video stream. I added a launcher to your script in
the themes VideoOSD.xml so it can easily be launched while playing a
video.

The skin is just meant to be a fancy display for squeezebox at the
moment. When I posted the last message I didn't know that the fonts
where inherited from the current skin so I think mine might look weird
as I think the xml is using Confluence font titles while I myself have a
modified Alaska as theme. Will have a second go at this later.

By the way, I can change the AV input on my receiver by "curl"-ing a web
page, this would be awesome if the script would do this while launching
(and perhaps "curl" another web page while exiting). Do you know where,
if possible, in the script I could add something like that?

I'm sorry for all the questions and such but I'm really enjoying being
able to integrate Squeezebox and XBMC, thanks again for a great script!


------------------------------------------------------------------------
tobiasfunke's Profile: http://forums.slimdevices.com/member.php?userid=50968
View this thread: http://forums.slimdevices.com/showthread.php?t=93544

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to