Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_cmd_playlist (Read 32171 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

foo_cmd_playlist

After finding that there was no way of switching active playlist through the command line, I finally bit the bullet and went ahead and wrote a component to do this.

foo_cmd_playlist

usage:
Add /playlist-activate:"Name" to the foobar command line to activate the named playlist.
You can also pass a numeric 0-based index to activate by position instead of name.

further development
Unfortunately C++ is not my language of choice (I like C#), consequently I will not be continuing development of this to extend it to any other playlist managment functionality such as renaming, removing, adding etc.

But, I've put the source cpp file in the zip file above, so if anyone who does like C++ wants to continue development in this area using this as a starting point, please do so, and consider what I have written public domain.


foo_cmd_playlist

Reply #2
Unfortunately C++ is not my language of choice (I like C#), consequently I will not be continuing development of this to extend it to any other playlist managment functionality such as renaming, removing, adding etc.

But, I've put the source cpp file in the zip file above, so if anyone who does like C++ wants to continue development in this area using this as a starting point, please do so, and consider what I have written public domain.
I don't like C++ either (I prefer C ;) ), but since I really wanted creating and renaming I have extended your code a bit (thanks for sharing, I would never have started without).

foo_cmd_playlist_0.0.2.zip

Everyone feel free to upload the file somewhere else. I can not guarantee eternal storage, so please avoid linking to it.

Source code is included and public domain. I doubt I will develope the component any further.
Code: [Select]
command line arguments:

   /playlist-find:"name"         activate playlist "name", create if necessary
   /playlist-new:"new pls"       create and activate playlist "new pls"

   /playlist-activate:"name"     activate playlist "name"
   /playlist-activate#N          activate playlist in position N
   /playlist-activate#playing    activate playlist currently playing

   /playlist-rename:"new name"   rename active playlist to "new name"
   /playlist-move:N              set active playlist's list position to N
   /playlist-move#N              move active playlist's list position by N

The index number N may have a sign, a negative index is interpreted as right-/bottom-offset. Thus the top list position is 0, the last position is -1.
Double quotes around names are only required if the name contains spaces.

foo_cmd_playlist

Reply #3
thanks, this is what i was looking for

foo_cmd_playlist

Reply #4
I want to ask to compile it for foobar 1.0. I have no knowledge to compile it by self.
Sourcecode is in the ZIP file
Thanx

foo_cmd_playlist

Reply #5
version 0.0.2 (from the 3rd post) works fine here

foo_cmd_playlist

Reply #6
Thanx,

any idea how to play the activated playlist with out a second command on the command line (/play)?

 

foo_cmd_playlist

Reply #7
Permalink.

foo_cmd_playlist

Reply #8
Neither of these commands work with foobar2000 1.01:
"C:\Program Files (x86)\foobar2000\foobar2000.exe" /playlist-activate: Radio
"C:\Program Files (x86)\foobar2000\foobar2000.exe" /playlist-activate: "Radio"

To test, I have a playlist named Radio, I change my current playlist to something different, then quit foobar2000.  Running either command above starts foobar2000, but does nothing else.  I'm still in the "Default" playlist and nothing begins playing.

What am I missing?



foo_cmd_playlist

Reply #11
What do you people use this plugin for? I mean no disrespect, just wondering

foo_cmd_playlist

Reply #12
What do you people use this plugin for? I mean no disrespect, just wondering 

jeremija,

I am using this plugin with my shareware file manager, to to hand over file(s) into different playlists.
This is HA. Not the Jerry Springer Show.

foo_cmd_playlist

Reply #13
so you can now have an option to enqueue the file to a specific playlist? interesting...

foo_cmd_playlist

Reply #14
so you can now have an option to enqueue the file to a specific playlist? interesting...

Yes, that's it. With my Windows explorer replacement software I am enqueueing files via commandline into different foobar playlists, for example I have one for Podcasts, an other one for own music projects and so on and that's why this component here is important for me.

Since I am using this plugin /playlist-activate:"music projects" worked, since I updated from f2k 0.9.6.9 to 1.01 I had to replace /playlist-activate with /playlist-find, so I came to my advice given above. And sorry for my bad English.
This is HA. Not the Jerry Springer Show.

foo_cmd_playlist

Reply #15
Failed to load DLL: foo_cmd_playlist.dll
Reason: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

with foobar 1.1.5 and win xp

work with 1.1.1 and win xp
Music is my first love.

foo_cmd_playlist

Reply #16
Find and install MS VC++ 2005 redistributable.


foo_cmd_playlist

Reply #18
Very useful, too bad it cant handle accentuated characters very well.
I tried using /playlist-find:"Rádio Online" and instead of jumping to the existing playlist, it created a new one with some weird character where the á should be.

Did it using a batch file, encoded both on ANSI and UTF-8, neither worked as supposed.

foo_cmd_playlist

Reply #19
I found another bug.
If foobar is already running and you run it again with
Code: [Select]
/playlist-activate:"Online Radio" /play
, the play command gets executed first and the wrong playlist starts playing.

I want to use that shortcut to start playing a certain playlist, even foobar is already playing other thing.

foo_cmd_playlist

Reply #20
Sorry to Necro a thread, but...

When I use the C:\foobar2000\foobar2000.exe' with parameters '/playlist-find:"X3" command, it correctly loads it.
I then C:\foobar2000\foobar2000.exe' with parameters '/play' and it works.

BUT when I then repeat it for something else, such as a new playtrack, it sticks with the loaded playlist (though it SHOWS the right one in the screen).

I bypass this error, by quitting foobar2000 every time I switch tracks, and manually restart with the correct playlist - but this is a pain.

Any suggestions?

Oh - Here is the obligatory pic. 




Re: foo_cmd_playlist

Reply #21
I'm not able to implement source code in new vs project.
Does anyone have a complete project to share?