app.player.setPlaylistPosAsync question

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

MyVikes
Posts: 89
Joined: Sun Jul 02, 2017 1:20 am

app.player.setPlaylistPosAsync question

Post by MyVikes »

I'm trying to use

Code: Select all

app.player.setPlaylistPosAsync(newIndex)
to set the currently playing track in the playlist and it works unless i try to set the index to "0". Of course 1 sets the currently playing song to 2 in the list, 2 to 3, etc. So i would expect 0 to set the currently playing song to the first song.

Any thoughts on why this could be?
MiPi
Posts: 867
Joined: Tue Aug 18, 2009 2:56 pm
Location: Czech Republic
Contact:

Re: app.player.setPlaylistPosAsync question

Post by MiPi »

Which build do you use?
I tried and it seems to work ok for me. Setting 0 sets first track in both situations - when no track was set before as playing and even when other track was playing. Tested by simple script, which just call app.player.setPlaylistPosAsync(0); on button click.
How exactly do you test it?
MyVikes
Posts: 89
Joined: Sun Jul 02, 2017 1:20 am

Re: app.player.setPlaylistPosAsync question

Post by MyVikes »

thx for the quick response i found my issue...it had to do with the javascript value conversion to a number and the default value setting.

there is no problem
Post Reply