PlayerControl is weird
#1
Music 
Playlist options acting up?!

In the process of skinning my albums/songs.. All is dynamic, all from plugins. No ID's but I do do it in MyMusicNav.

PlayerControl(repeatOff)
If I set Playlist.repeatOff, and navigate from last item in the playlist to the next, I get an error instead of the first item in the playlist.

PlayerControl(repeatOne)
If set, I expect the current playlist item to keep repeating. But this effectively makes it impossible to navigate the playlist using next/previous! As they.. omg.. keeps selecting the number hat was playing when this was set!?

PlayerControl(RandomOn)
If I am lucky, the playlist is simply SHUFFLED as I run this?! The expected action is ofcourse that when random is on, moving to the next/previous song picks a random entry in the playlist.
IE RandomOn appears to be running player.shuffle().

PlayerControl(stop)
If the player is stopped with PlayerControl(stop), there is no way of getting it to play again? PlayerControl(play) does not start playing. Play only works if... lol.. the player is already playing!! or paused. I cannot get the player to start playing at all, except by adding a new item to the playlist!

Is this by (really poor) design? Either Jarvis (or me) is suffering from a minor meltdown?

...Or - more likely I hope - I am looking at this the wrong way?

If you think so, how should I control it all? Is it expected that I keep track of the users desire to play random items, and run player.shuffle() from a script whenever the playlist position change? And likewise with repeatOne/None/All?

The Fix to Random and Move NExt/Previous:
This is the code for the next/previous onclick that made it work as I expected it to work. When navigating, If "RandomOn" it chooses a completely random song from the current playlist.
It also handles navigation to next/previous song regardless of the repeat option.

Code:
<onclick condition="Playlist.IsRandom">PlayerControl(RandomOff)</onclick>
<onclick condition="Playlist.IsRandom">PlayerControl(RandomOn)</onclick>
<onclick condition="Playlist.IsRandom">PlayerControl(RandomOff)</onclick>
<onclick condition="Playlist.IsRandom">PlayerControl(RandomOn)</onclick>
<onclick condition="Playlist.IsRepeatOne|!Playlist.IsRepeatOne + !Playlist.IsRepeat">PlayerControl(RepeatAll)</onclick>
<onclick>PlayerControl(previous)</onclick> <!-- use (next) for the matching "|>" button
<onclick condition="Playlist.IsRepeatOne">PlayerControl(RepeatOne)</onclick>
<onclick condition="!Playlist.IsRepeatOne + !Playlist.IsRepeat">PlayerControl(RepeatOff)</onclick>

Update
To be honest,I am not so sure that doing the random all the time is the best option, as you cannot go back to listen to "that one song you just heard a while ago whilst shuffling your entire 1955 Jazz collection but kinda forgot to notice while it was playing but don't know who played but you kinda liked it and want to hear more of.."

Thinking more about this, the above is not really a solution at all. I don't want to settle with a shuffled playlist. I want my playlist to be in just the order I added the items to it. AND I want to see my playlist in that order, and ONLY that order. YET I still want the "play random" feature AND I want to be able to go back through the last played items. IF RandomOn, go to the previous/next(could be a new random entry) played items.

Also I want to be able to navigate my playlist even though it isn't playing..

So there we are...

Time to (also) write up a python-playlist-handler and "only" use the built in player (which I hear is actually pretty cool!) for playing a single item at the time?.. sigh..
Well, if I succeed at least I should be able to save/load my current playlist.

Jarvis:16.0-BETA2 Git:20151115-07f691e
Reply
#2
RepeatOff - the playlist should stop after the last item - there isn't a "next" item to play... That's what repeatAll is for.

RepeatOne - the playlist is filled with the current song - the next song is the same as the current one. I do understand what you are getting at though. Perhaps you can use a condition and multiple onclick commands to first switch the playlist back to repeatoff, go to next song and then turn repeatone back on?

RandomOn - the position of items in the playlist are mixed up - this prevents songs from being played twice and also allows you to edit the playlist whilst playing, add or remove songs and change the position of songs. I think true random selection of next song would be really annoying because you could get the same song 5 times before you hear another song once. It would also prevent you from having things like "Next Up... Blah blah by blah blah" because the next item in the playlist wont necessarily be the next one that plays, whereas if the playlist is shuffled it will be.

Stop - you can get it to play again by going into the playlist and clicking on an item. Why not just use pause instead? Though I do agree that a PlayerControl(Play) command really should restart the current playlist from the beginning if stopped rather than do nothing - However, the default control for the Play button on a remote in the library is to play the currently selected item so I can see how this would cause plenty of confusion -- though there should still be a way to send a command to get the playlist going again imo.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
Thaks Jurialmonkey. The confirmation is good enough for me. I''ll just rename the functions in my head and deal with it. Thanks for the ideas about running multiple commands. Hopefully I can find a way to move to playlist position even if the player is in the stopped state.

The error I saw is probably on me as my "on next, interceptor script" is wip.

I will update my first post with what makes it all tick the way I want to.

p.s.. My remote only has a single button, and a scrollwheel, oh and a cursor Wink
Reply

Logout Mark Read Team Forum Stats Members Help
PlayerControl is weird0