Seite 1 von 1
| Nachricht |
Hi guys,
i tried to clear the whole Playlist with this script...
C:\Programme\Silverjuke\silverjuke.exe --execute="player.removeAll();" C:\Programme\Silverjuke\silverjuke.exe --execute="player.removeAtPos(1+1);"
Hi Grobekelle,
(Sorry, forgot to answer your original question in the other thread...)
> C:\Programme\Silverjuke\silverjuke.exe
> --execute="player.removeAtPos(1+1);"
>
> Sometimes it works, but sometimes it just skips
> the song which is playing. If it works, the song
> whos cleared is still in the playlist but SJ
> ignores it and jumps on to the next song. is
> there a way to refresh the playlist? And whats
> wrong with my Batch, why does it work sometimes
> why it sometimes skips the song which is
> playing?
Say you have a playlist like:
0 song A
1 song B
2 song C
3 song D <-- currently playing
4 song E
Your 1+1=2 (if I remember kindergarten correctly
) so your call will always remove song C, whatever you current position in the list. Which means you must always take your current playing position (player.queuePos) into account when making these type of changes.
For the deletion of a single song (at least if I understood you correctly and you want to remove the next upcoming song) you were close:
player.removeAtPos(player.queuePos+1)// remove the first song until the currently playing song is the first song
while (player.queuePos > 0)
{
player.removeAtPos(0);
}
// remove the second song until there is only one song left
while (player.queueLength > 1)
{
player.removeAtPos(1);
}
Thanks SilverEagle,
it works, but the song stays in the playlist for so long till the next one beginns playing or another song is added to the playlist. Is there a way to refresh the playlist, after clearing a song? iam using blue touch...
greetings and thanks again....
Grobe
Grobekelle wrote:
> it works, but the song stays in the playlist for
> so long till the next one beginns playing or
> another song is added to the playlist. Is there a
> way to refresh the playlist, after clearing a
> song? iam using blue touch...
Ah, I was not expecting you to use my 'special' skin...
You just found an issue with Silverjuke scripting not functioning as specified
. I'll report this in a separate thread on the forum but I'll try to create a workaround for you somehow, if I do I'll get back to you.
SilverEagle
Thanks, youre my man!