LiveInfo API Track Holders
  • I have pulled up the widget for LastTrackHolder from the showinfo.js but I would also like to include the Previous Track which is available in the live-info.. but I must be doing some thing wrong.. I thought an extra line might do it.. and a minor change to the widget and css. It seems a pity not to use it as its available.

    line 207
     obj.append("<ul class='widget now-playing-bar'>" +
                       // "<li class='previous track-metadata'>"+options.text.previous+": "+sd.previousTrack.getTitle()+"</li>" + //
                       "<li class='current track-metadata'>"+options.text.current+": "+sd.currentTrack.getTitle()+"</li>" +
                       "<li class='next track-metadata'>"+options.text.next+": "+sd.nextTrack.getTitle()+"</span></li>" +
                       "</ul>");

    the live-info looks like this
    {"env":"production","schedulerTime":"2013-05-06 00:15:47","previous":{"name":"general fuzz - capital yes","starts":"2013-05-05 14:06:41.868","ends":"2013-05-05 14:13:23.736","type":"track"},"current":{"name":"general fuzz - dragonfly","starts":"2013-05-05 14:13:23.736","ends":"2013-05-05 14:16:21.996","media_item_played":true,"record":0,"type":"track"},"next":{"name":"general fuzz - return value","starts":"2013-05-05 14:16:21.996","ends":"2013-05-05 14:21:45.444","type":"track" managed to append this to the widget.. 

    cheers, Phil