TVDB are updating their site. Their site currently has a number of bugs that have broken the TVDB scraper and any add-on that relies on TVDB data. TVDB are working to rectify the problems.

set focus absolute position
#1
I'm working up a list of playlist items that can be scrolled forward and backward using static content in a list/fixedlist.   What I'd like to be able to do is set the focus of the list to the currently playing item.  I've tried
<onload>SetFocus(id,#,absolute)</onload>
but it seems to count from the first visible item in the list, rather than the first item.
The static list is set up like this
                <item id="1">
         <label>$INFO[MusicPlayer.offset(-10).Title]</label>
         <visible>MusicPlayer.offset(-10).Exists</visible>
  </item>
and so on thru offset(10)
So I know for certain what the currently playing item is (11, in this case).

Is there some nuance to the absolute position that I am missing?
Reply
#2
Do you have a parent folder item?
Reply
#3
I think the answer to your question is no.

I’m playing songs selected from a dynamic list generated by using musicdb://albums/ or similar and onclick playmedia(..) to play.
Reply
#4
I figured out a way to get what I wanted.  A little bit of brute force with setfocus and the status of the list


<onclick condition="MusicPlayer.offset(0).Exists">SetFocus(9900,0,absolute)</onclick>
<onclick condition="MusicPlayer.offset(-1).Exists">SetFocus(9900,1,absolute)</onclick>

and so on to the last list item that may not exist. 
<onclick condition="MusicPlayer.offset(-10).Exists">SetFocus(9900,10,absolute)</onclick>
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
set focus absolute position00