python adjustments
#16
why didn't i think of testing like that.hehe
it was easier to see if it is right now.
even esier if you use a spy file to do it.
the result is printed to the browser then.
http://home.no.net/thor918/xbmc/stuff/sh...etest2.spy

wait.just looking on it some more.



Reply
#17
you see if just the shuffle/unshuffle is called and your not loading the playlist "xbmc.player().play(plist)".
the output will change.
the loading of playlist will result in first song in playlist is selected.

what i was thinking of was toggeling on off the shuffling, without changing the currently playing song. like in the gui, when you are turning the shuffle on off, the song currently playing does not change before the user for example pushes a button.

if you see on the test:

shuffle

smb://10.0.1.47/p/complete/musikk/2004 - frail (192kb)/04 - take my heart away.mp3
smb://10.0.1.47/p/complete/musikk/2004 - frail (192kb)/10 - because i'm dead.mp3
smb://10.0.1.47/p/complete/musikk/2004 - frail (192kb)/04 - take my heart away.mp3

unshuffle

smb://10.0.1.47/p/complete/musikk/2004 - frail (192kb)/07 - natural scilence.mp3

look at the last shuffled file.
*04 is playing,
*unshuffle command is called,
*next song button is pushed.

04. next song should be 05
but it selected 07

but still it seems like it's just unshuffle that is not right on.
do you see what i'm talking about now?



Reply
#18
yes, i understand now. as i said before or meant to, the player needs to be reset. i thought i did it, but it was late and i ended up resetting the whole xbox. Smile

i look into it some more, may need a developer though.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#19
what the code is doing is i think:

1. get's the currently playing song.
2. shuffles/unshuffles
3. cycles through the playlist to find the same song.
4. sets the currently playing song to this.

i think if you tested some more you would find that the shuffle isn't necessarily playing the next correct song either.

could this be done in python?

i'll look some more, but a developer probably would have to change this.

here's a script that has one button and allows you to shuffle/unshuffle the playlist.

queue a few items first then run the script. i used the web server to view the playlist.



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
python adjustments0