Playlist Scrolling

Help each other out

Playlist Scrolling

Postby cygnusaa on Mon Nov 27, 2006 4:40 pm

Accidentally posted in "Feature Request" reposted here.


Hi all,

This might seem like an easy one but....let's see.

How do I get a playlist to continuously scroll in a way that it always keeps the playing song to remain visible on the playlist?

In other words, I have a small area where I have my playlist on display, the currently playing song is highlighted (as I chose) but as time goes by, the highlight disappears out of view because the list did not scroll. It basically remained on page 1 or wherever it happened to start.

I can't figure it out.

cyg :?:
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Postby cygnusaa on Mon Nov 27, 2006 6:22 pm

another issue is when i have shuffle enabled....the playlist does not reorder itself based on its shuffle

it stays in order (usually alpha) after i use "play all" event to get the playlist populated with all of my tracks (i would use "add all" event but i dont see it anywhere)
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Re: Playlist Scrolling

Postby cinOxen on Mon Nov 27, 2006 7:25 pm

cygnusaa wrote:How do I get a playlist to continuously scroll in a way that it always keeps the playing song to remain visible on the playlist?


I don't think this is possible.
cinOxen
 
Posts: 53
Joined: Thu Sep 14, 2006 6:19 pm

Postby dalanik on Mon Nov 27, 2006 8:46 pm

it is possible, it is called "snap" track. it then scrolls the list and displays the playing song. it is impossible for playlist to rearrange itself, though.

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby cinOxen on Mon Nov 27, 2006 9:20 pm

dalanik wrote:it is possible, it is called "snap" track. it then scrolls the list and displays the playing song. it is impossible for playlist to rearrange itself, though.

D.


Opps

:oops: *think before you type, think before you type*
cinOxen
 
Posts: 53
Joined: Thu Sep 14, 2006 6:19 pm

Postby cygnusaa on Tue Nov 28, 2006 3:36 am

ok so it wont re-arrange itself to reflect how the shuffle resulted..i can live with that....

the "snaptrack" feature sounds like it would do what i mainly want....

how do i use it?

i fiddled w/o success....

oh and thanks for the reply :D
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Postby S Pittaway on Tue Nov 28, 2006 7:48 am

snaptrack works after xxx seconds of activity (ie if you are currently scrolling around the playlist it does nothing, but if you leave it and "listen" to music it will you to keep each track in place).

You can change the time out value using a variabvle called snaptrackwait, i set it to 1 to make it more likely to jump (command:xlobby:save to variable:1:snaptrackwait).


You can re-order the playlist into a random layout but you need to use a plugin.... I do it by writing a shuffle.pos to each track in the playlist then sort on it. Its easy to do with small playlists (<500 tracks) but it takes a while to run on longer lists.

To get round this i simply write a shuffle.pos into every track whenever xlobby starts up, then random play all (10000) tracks is reasonably quick.

Unfortunately the plugin i use is really closely linked to my own skin so its not much use to anyone else...


If you want i could give you a bit of c# code to do a simple random re-order on the playlist (it works on all sizes, it just takes a while for long ones) ? but you would have to plugin-ise it :)
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby cygnusaa on Wed Nov 29, 2006 6:25 am

ok then....snaptrak it is...im off to try it again...


as for the c# code...much thanks...not sure how to plugin-ise something but i think i get the jist of it....ill let you know


im learning something new weekly so thats a good sign...or madness...heh.
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Postby cygnusaa on Wed Nov 29, 2006 6:45 am

sig test
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Postby cygnusaa on Wed Nov 29, 2006 6:45 am

bah
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Postby cygnusaa on Thu Nov 30, 2006 5:40 am

hey pitt....

think you could give me some more insight to snaptrack? im having no luck

first...i notice the event is called snap track but the id variable list says snaptrack (no space)

i made a button, named it snaptrack, assigned the event snap track from event list... button toggles correctly but playlist doesnt change...

i made the playlistwait set to variable addition to the snap track event as you suggested but..i think im missing something...

i assumed when i made it that 1 goes on the first line and snaptrackwait on the second...

also, i tried iterations of snap track and snaptrack for all attempts

what do you think?
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Postby S Pittaway on Thu Nov 30, 2006 7:53 am

The toggle event is "command:music:snap track"

The variable to reduce the time out is "command:xlobby:save to variable:1:snaptrackwait"


If you move the mouse snaptrack does not do anything, kick of a some songs, let them play and it should start moving the playlist when it goes to the next song.

If you hit a muic next button this does not heppen.

Like i said this is by design, it only scrolls the playlist when you are simply "listening" to the tracks.

I use a remote to control xlobby so i dont have to worry about the time outs...





And heres a simple bit of code to shuffle the playlist (it can be tweeked to do nice things like plut played songs at the end off the playlist and try and put good songs near the start.... )



static Random m_Rand = new Random();

/// <summary>
///
/// </summary>
static string GetShufflePosition()
{
return ((long)(m_Rand.NextDouble() * 999999999)).ToString("d10");
}//GetShufflePosition


/// <summary>
///
/// </summary>
static int GetNoEntries(XPluginHelper xhelper, string Category)
{
int NoEntries = 0;
string Text = GetField(xhelper, Category, "position").Trim();

int Pos = Text.LastIndexOf(' ');

if (Pos > 0)
{
if (!int.TryParse(Text.Substring(Pos), out NoEntries))
NoEntries = 0;
}

return NoEntries;
}//GetNoEntries


/// <summary>
///
/// </summary>
static void ShufflePlaylist(XPluginHelper Helper)
{
//HOW IG IS IT?
long Pos = 0;
long NoItems = GetNoEntries(Helper, "playlist");

//LOCK THE SCREEN
Helper.GrabPaintKey();

//RESET THE PLAYLIST
Helper.SendCommand("command:category:reset:playlist");

//RESHUFFLE THE FIRST THEM ALL
for (Pos = 1; Pos <= NoItems; Pos++)
{
//UPDATE IT
Helper.SendCommand("command:category:variable set:playlist:shuffle.pos:" + GetShufflePosition());

//MOVE TO THE NEXT ONE
Helper.SendCommand("command:category:next item:playlist");
}

//SORT IT
Helper.SendCommand("command:category:set sort order:playlist:shuffle.pos");

//FREE THE SCREEN
Helper.ReleasePaintKey();

}//ReshufflePlaylist

S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby vicom on Fri Dec 01, 2006 2:34 pm

S Pittaway wrote:

Like i said this is by design, it only scrolls the playlist when you are simply "listening" to the tracks.

But this should be a standard feature....shouldbe able tomove along playlist asyou skip tracks... :cry:
vicom
 
Posts: 206
Joined: Tue Apr 20, 2004 6:16 am
Location: South Africa

Postby S Pittaway on Fri Dec 01, 2006 3:11 pm

nope, you could be editing the playlist, or simply scrolling down looking for a given song...

if thats the case it would be really anonying if the selected item sudenly changed to the current song.

Personally i would like an option to lock onto the current item, but steven isent doing changes at the moment so its not likley to be added soon.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby cygnusaa on Sat Dec 02, 2006 2:24 am

im still lost...

i dont know coding at all....im pretty good with software and i understand scripting but i cant get the hang of what you are telling me...

where do i type/put/select snap track?

do i name the category box snap track? currently its called playlist naturally...

do i make a button called snap track? ( i did this and all it does is toggle) i succesfully added the wait mod as you mentioned so i do see that under the snap track event...

doesnt seem to do anything...

i let my playlist play without moving the mouse or touching it and ...no luck...

i feel like a dolt..
cygnusaa
 
Posts: 45
Joined: Tue Jun 13, 2006 3:39 am
Location: northern new jersey

Next