Author Topic: Play position of playlist  (Read 5363 times)

bazinga

  • Guest
Isn't there a "NowPlayingList_SetCurrentIndex" to set the current playing song in a playlist? I can get the current song with NowPlayingList_GetCurrentIndex, but to go to (say) song #5 in the playlist I have to loop over Player_PlayPreviousTrack (or next) N times (and this I'm afraid triggers a lot of events in musicbee, which somehow freezes for seconds)

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 35001
you can use something ljke this to play a specific index

url = NowPlayingList_GetFileUrl(index)
if url is null then
  the index is not valid eg. exceeds the now playing list size
else
  NowPlayingList_PlayNow(url)

bazinga

  • Guest
cool, I'll try it.

BTW what happens if the url I specify is not in the now playing list?

(when you have some time can you also give a look at a possible bug:
http://getmusicbee.com/forum/index.php?topic=1972.msg76576#msg76576
? Thank you)