mherger wrote: 
> >> Hmm... I thought the player UIs were working as expected. Then you
> >> should be fine, as you're using the same methods as those. I'm
> hesitant
> >> to change something which has been working as expected for years...
> > 
> > It's your call - you know the code *much* better than I. But Material
> is
> > using the "trackinfo" command via JSONRPC - and this is handled in
> > 'Slim/Menu/Trackinfo.pm', *not* 'Slim/Web/Pages/Trackinfo.pm' - so
> your
> > changes have no affect on Material (or any other clients using this
> via
> > JSONRPC). As stated, passing the playlist_index to "trackinfo"
> -seems-
> > to be working OK for me, so perhaps no change is required. However, I
> > only discovered this by chance. If I pass a trackId, then the index
> is
> > not used - and the wrong URL is used.
> 
> Got too many mails in my inbox today... could you please summarize the 
> issue you're seeing? I did indeed only fix the web handler, as I was 
> assuming the other interfaces were working as expected. What does work 
> for you, and what does not? Can you give me step-by-step instructions to
> 
> reproduce?

With a relased version of Material (i.e. not latest from git):
  
-  Locate a station under "Radio" - noy BBC iPlayrt, etc.
-  Add station to queue
-  Queue initially has http://opml.radiotime.com/.... URL for loaded
  station
-  Wait some time, or re-load web page - and queue will now have
  stations action URL
-  Activate 'More' option on queue item's context menu
-  'More' details will not have "TuneIn Options"
  

*However*, this would never have worked - as Material does not pass the
stations URL to the "trackinfo" command. I did try adding the URL - this
worked initially, but (as stated) sometime later the URL changes and the
command fails. In git/master I have changed Material to pass the queue
index when asking for "trackinfo" of a queue item. This seems to work -
as 'Slim/Menu/Trackinfo.pm' has some code to handle the case where an
index and *no* id is sent. I -think- it should handle the case where an
id and url are sent - as using just the index there is a (very unlikely)
race condition (e.g. a plugin removes a track from the queue just after
Material is about to make the request (so material has index X) but
before LMS receives the request (so track is now at X-1)).

If you load a TuneIn station into the play queue, you can see what URL
it is using via:


Code:
--------------------
    
  curl 'http://localhost:9000/jsonrpc.js' --data-binary 
'{"id":1,"method":"slim.request","params":["00:01:02:03:04:05",["status","-",1,"tags:u"]]}'
  
--------------------


(replace '01:02:03:04:05' with your player's MAC). You should see that
initially it has the TuneIn URL, but later it changes.

If you call the following with the TuneIn URL (as THE_URL), then you
will see the options:

Code:
--------------------
    
  curl 'http://localhost:9000/jsonrpc.js' --data-binary 
'{"id":1,"method":"slim.request","params":["00:01:02:03:04:05",["trackinfo","items",0,50,"url:THE_URL","menu:1","html:1"]]}'
  
--------------------


...but as the URL in the queue changes, using the queue item's current
URL as THE_URL will then not have the TuneIn options, but (if the
station was the 1st URL) the following would:

Code:
--------------------
    
  curl 'http://localhost:9000/jsonrpc.js' --data-binary 
'{"id":1,"method":"slim.request","params":["00:01:02:03:04:05",["trackinfo","items",0,50,"playlist_index:0","menu:1","html:1"]]}'
  
--------------------


Does that make sense?


------------------------------------------------------------------------
cpd73's Profile: http://forums.slimdevices.com/member.php?userid=66686
View this thread: http://forums.slimdevices.com/showthread.php?t=110714

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

Reply via email to