All forums » Creating Skins, Scripts and Modules » Externally adding a playlist to the top of the queue

Page 1 of 1

Message

Externally adding a playlist to the top of the queue

SilverEagle on Jan 7th · Reply

(continued from here)

Grobekelle wrote:
> Hi SilverEagle,
>
> you told me in the german forums, that it is
> impossible to load a playlist via
>
> > C:\Programme\Silverjuke\Silverjuke.exe
> > --execute="player.addAtPos(0,
> > 'D:\xyz.m3u');"
>
> Is there another way to realize it? So i would
> like to put 4-5 songs via a shortcut at the top
> of the playlist. Maybe with a script that looks
> like that:
>
> player.addAtPos(0,'D:\xyz0.mp3');
> player.addAtPos(1,'D:\xyz1.mp3');
> player.addAtPos(2,'D:\xyz2.mp3');
> player.addAtPos(3,'D:\xyz3.mp3');
> .....
>
> I guess this should work, but i dont now how the
> code has to look like exactly, can you help me
> out?
>
> greetings patrick


Hi Patrick,

Like in wrote in the German forum:

C:\Programme\Silverjuke\Silverjuke.exe D:\xyz.m3u

will add the playlist at the end, but this is not what you want.

Your suggestion is possible, but to see what is the most elegant solution could you give some more background, like:
- What do you need it for?
- Does your controlling app generate a m3u file, or can you script that freely yourself?

SilverEagle


Re: Externally adding a playlist to the top of the queue

Guest on Jan 10th · Reply

SilverEagle schrieb:
> (continued from here)
>
> Grobekelle wrote:
> > Hi SilverEagle,
> >
> > you told me in the german forums, that it is
> > impossible to load a playlist via
> >
> > > C:\Programme\Silverjuke\Silverjuke.exe
> > > --execute="player.addAtPos(0,
> > > 'D:\xyz.m3u');"
> >
> > Is there another way to realize it? So i would
> > like to put 4-5 songs via a shortcut at the top
> > of the playlist. Maybe with a script that looks
> > like that:
> >
> > player.addAtPos(0,'D:\xyz0.mp3');
> > player.addAtPos(1,'D:\xyz1.mp3');
> > player.addAtPos(2,'D:\xyz2.mp3');
> > player.addAtPos(3,'D:\xyz3.mp3');
> > .....
> >
> > I guess this should work, but i dont now how the
> > code has to look like exactly, can you help me
> > out?
> >
> > greetings patrick
>
> Hi Patrick,
>
> Like in wrote in the German forum:
>
> C:\Programme\Silverjuke\Silverjuke.exe
> D:\xyz.m3u
> will add the playlist at the end, but this is not
> what you want.
>
> Your suggestion is possible, but to see what is
> the most elegant solution could you give some
> more background, like:
> - What do you need it for?
> - Does your controlling app generate a m3u file,
> or can you script that freely yourself?
>
> SilverEagle


Hi SilverEagle,

thanks for your reply. I used your Skin for a Xmas Party the first time, it worked pretty well, but there is one little problem, which crashes the party. Think about this situation,
a song is playing and everybody is dancing, but the next song in the playlist isnt good for a dance, so in this Situation I would like to load a playlist or a couple of songs (3-5) which will put on the top to the playlist, but all other songs should stay in the list. And I would like to do that with a shortcut, because i have a remotecontrol, which sends different shortcuts to my pc. So the next time people are dancing on a kind of music i can add some songs of the same kind with my remotecontrol easily from the bar. :) Usally i create a m3u file, but i also would be fine with a script, where i have to put in the mp3 manually. Maybe theres another way, let me now? Do you have any solution for me, but attend to my words, i have no clue about c/c+. Thanks for your help....

greetings Patrick


Re: Externally adding a playlist to the top of the queue

SilverEagle on Jan 10th · Reply

Hi Patrick,

First suggestion: Do you have a laptop you could use on the same network as the jukebox and which only you could control from behind the bar? You could then use my remote plugin to get full (correctional) control over the playlist any way you want.

But as you create the m3u/script/whatever file yourself by hand, I think an external shortcut solution is possible as well. I'll try to get back on that tomorrow.

SilverEagle


Re: Externally adding a playlist to the top of the queue

Guest on Jan 11th · Reply

No room for a laptop behind the bar. :(


Re: Externally adding a playlist to the top of the queue

SilverEagle on Jan 11th · Reply

Guest wrote:
> No room for a laptop behind the bar. :(

That is good news, meaning all available space is filled with drink? Smile

But seriously:

Try this in a batchfile:

silverjuke.exe --execute="player.addAtPos(player.queuePos + 1, 'C:\\MP3\\Aerosmith\\Get A Grip\\05-Livin\' On The Edge.mp3');"
silverjuke.exe --execute="player.addAtPos(player.queuePos + 1, 'C:\\MP3\\Aerosmith\\Get A Grip\\06-Flesh.mp3');"
silverjuke.exe --execute="player.addAtPos(player.queuePos + 1, 'C:\\MP3\\Aerosmith\\Get A Grip\\07-Walk On Down.mp3');"
silverjuke.exe --next

Naturally with your own songs etc Wink

Unfortunately you have to escape the backslashes and single quotes with a preceding backslash, I did not thing of a workaround for that yet.

I added a "silverjuke --next" line, as your original intention was replacing a not-dancable song with a few pre-cooked songs, so I presumed you'd want to start the loaded list straight away. If not, just remove that line.

Alternatively you could put this in a batchfile:

@for /f "delims=|" %%x in (%1) do silverjuke.exe --execute="player.addAtPos(player.queuePos+1, '%%x');"
silverjuke.exe --next
store in silverjuke_queue.bat

and creating listings like this:

C:\\MP3\\Aerosmith\\Get A Grip\\05-Livin\' On The Edge.mp3
C:\\MP3\\Aerosmith\\Get A Grip\\06-Flesh.mp3
C:\\MP3\\Aerosmith\\Get A Grip\\07-Walk On Down.mp3
store in listing.lst

Now load up your listing with a shortcut like:

silverjuke_queue listing.lst

With the second version you can easier manage multiple playlists, without having to copy the ugly silverjuke command to each line. You'd still have to use the backslash-escapes though.

Note that all the examples above are based on storing the batchfiles, lists and shortcuts in your silverjuke program directory, and using that as working directory for the shortcuts.

Have fun,
SilverEagle


Re: Externally adding a playlist to the top of the queue

Guest on Jan 11th · Reply

Actually not the whole bar is filed with drinks, but if you handle drinks behind the bar it is wet everywhere and i guess its a bad idea to use a laptop over there. :P

OnTopic...

Thank you so much, ill try this when i find a free minute.

greetings

Patrick


Re: Externally adding a playlist to the top of the queue

Grobekelle on Feb 4th · Reply

Allright, today i tried your solution with the batchfile. It works great, thx. Is there any way to run the batchwindow in the background, at the moment it pops up as soon as i start the batchfile and closes a few seconds later.

I didnt understand your second solution, could you be more specific?

This is what I did so far:

Made a batchfile called silverjuke_queue.bat with this in it and copied it to my silverjuke folder:

@for /f "delims=|" %%x in (%1) do silverjuke.exe --execute="player.addAtPos(player.queuePos+1, '%%x');"
silverjuke.exe --next

I created a listing.lst file with the path to the mp3s in it. like you told me above.

I dont understand the last step, how to load up my listing via shortcut?
Where to put this in?

Thx....


Re: Externally adding a playlist to the top of the queue

SilverEagle on Feb 4th · Reply

Grobekelle wrote:
> Allright, today i tried your solution with the
> batchfile. It works great, thx. Is there any way
> to run the batchwindow in the background, at the
> moment it pops up as soon as i start the
> batchfile and closes a few seconds later.
>


Yes, run 'minimized', ...

> I didnt understand your second solution, could you
> be more specific?


... but I made it easy for you: my testfiles are in the attached zipfile.

(No idea why I originally did not post them for you in the first place. Must have been sleeping at the time Wink)

Good luck,
SilverEagle

Download Queue_demo.zip
(950 Bytes, Downloaded: 45 Time(s))


Re: Externally adding a playlist to the top of the queue

Guest on Feb 4th · Reply

Wow, thank you so much ill try this tomorrow.
One more thing i need to know, is there also a way to create a batchfile which deletes the whole playlist but keeps playing the actual song?

greetings patrick


Your reply:


Log in



You have the option to become a registered user of our forums: Registered users can post or edit topics under their names and have access to protected data and to a lot of additional, powerful features. A registration is free of charge. Go to registration page...

Searching forums

Recent posts

RSS+Newsletter