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: how click on a song, it is added to the default playlist and played (Read 4431 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: how click on a song, it is added to the default playlist and played

Reply #1
Where are you clicking a song from?

'Add to playlist' (or "enqueue") will never start playback automatically since it is assumed if you are already playing from a playlist, you would not want the newly added track to start playing and interrupt that. The whole point is to continually add tracks while playing, but if every added track started playback it would be useless.

If you are trying to "enqueue" tracks from Windows Explorer, you would have to use a batch file in the right-click > SendTo menu instead. From memory in the batch file you would need a command to add tracks, then pause / timeout for a second, then another command to play - trying to do it all on one command line did not work. (I'm not on my PC right now to test)

Basically, "add & play" is not possible by default, you have to workaround it. (Though some third-party library viewers might have it as an option)

Re: how click on a song, it is added to the default playlist and played

Reply #2
from win explorer.

Are you sure there isn't a component that has this function? :(

I don't understand why I can't play a track that I want to add to my playlist, I click it, listen to it and if I don't like it I remove it from the playlist, it seems like normal behavior to me

In the thread DClaville speak about Old Facets, what is?

edit. I use JScript Panel script, if it can help me


Re: how click on a song, it is added to the default playlist and played

Reply #3
from win explorer.
Double clicking in Explorer is opening the default application for the file type (which you've set as FB2K) and playing the file.  If you want to add the file to an existing playlist you need to drag the file onto FB2K in the task bar rather than double-click it.

For actions within FB2K, you can't just invoke it from outside FB2K.  Use the library explorer functions within FB2K instead of Windows Explorer.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: how click on a song, it is added to the default playlist and played

Reply #4
My default player is not Foobar 2000, but if you set your Preferences/Shell Integration like the below, right-clicking a file in Windows Explorer and using Open With->Foobar will send the file to the specified playlist, erase what is currently on the list (yikes!), and immediately begin playing the song.  The "enqueue" option exists to avoid the auto-erasure issue of the specified playlist, however there still is not an oft-requested built-in option to "enqueue and play."

I keep "enqueue" unchecked and always set the playlist for the "always send new files.." action to "Default."  As that is not a "playlist" per-se what gets auto-erased there doesn't bother me (the file itself is not deleted from the PC).  Normally I am using that action anyhow to check out a newly downloaded song, and if liked it move it immediately within Foobar to another playlist.

Making Foobar the default music application will, like fooball indicated, skip the "Open With->" part above and just begin playing the file on a double-click, albeit with the same resultant action acccording to how the enqueue is set in Preferences.

Re: how click on a song, it is added to the default playlist and played

Reply #5
I have a playlist called "External" for that.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: how click on a song, it is added to the default playlist and played

Reply #6
thanks for the help :)
I know that with the right button I can get what I want, as well as disabling the playlist but that's not what I want.
before I started using the playlists, when I clicked on a song it played directly (now I don't remember what settings I used). But I still don't understand why there is no possibility of doing the same thing using the playlists and that with all the components that do the most unthinkable things, there is not one that plays the song :(

Re: how click on a song, it is added to the default playlist and played

Reply #7
The problem is that by double-clicking in Windows Explorer you are not interacting with FB2K.  Windows is sending the file to the default media player, in this case FB2K, and FB2K is responding by acting on the sent file as configured in its shell integration settings.

sveakul's post above shows you how to adjust the shell integration so that external files get put in a dedicated playlist (rather than wiping out an existing playlist), from where you can manipulate them as you wish.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: how click on a song, it is added to the default playlist and played

Reply #8
The problem is that by double-clicking in Windows Explorer you are not interacting with FB2K.  Windows is sending the file to the default media player, in this case FB2K, and FB2K is responding by acting on the sent file as configured in its shell integration settings.

sveakul's post above shows you how to adjust the shell integration so that external files get put in a dedicated playlist (rather than wiping out an existing playlist), from where you can manipulate them as you wish.

maybe I misunderstood but if I disable enqueue, every time I click on a song the file I previously had in the playlist is deleted.

Re: how click on a song, it is added to the default playlist and played

Reply #9
maybe I misunderstood but if I disable enqueue, every time I click on a song the file I previously had in the playlist is deleted.
Yes, THAT IS THE EXPECTED ACTION--did you not read the above posts by myself and fooball??  Until somebody writes an "enqueue and play" option for that setting, you will need to check "enqueue" when opening a file outside of Foobar with Windows to keep it from the removing remaining entries in the playlist you have specified in that option area when starting playback.  Enter some dummy playlist name you don't care about.

Re: how click on a song, it is added to the default playlist and played

Reply #10
maybe I misunderstood but if I disable enqueue, every time I click on a song the file I previously had in the playlist is deleted.
Yes, THAT IS THE EXPECTED ACTION--did you not read the above posts by myself and fooball??  Until somebody writes an "enqueue and play" option for that setting, you will need to check "enqueue" when opening a file outside of Foobar with Windows to keep it from the removing remaining entries in the playlist you have specified in that option area when starting playback.  Enter some dummy playlist name you don't care about.

sorry, but I don't understand some parts well, even using the translator :)

and maybe I didn't explain myself well on the use I want to make. I have the discography of many singers and I would like to click on the entries of the songs that I seem to remember that I like and I would like to hear them directly (then if they are bad I manually delete them from the playlist) but if I disable Enqueue I lose the playlist, if I leave it enabled I don't hear the songs and I have to click on them to start them

I was told that the Facets component did this, so I was hoping there was some other component that added this feature

Re: how click on a song, it is added to the default playlist and played

Reply #11
maybe I misunderstood but if I disable enqueue, every time I click on a song the file I previously had in the playlist is deleted.
Yes.  That's why we use a dedicated playlist for shell integration.

I have the discography of many singers and I would like to click on the entries of the songs that I seem to remember that I like and I would like to hear them directly
Use a library search panel in FB2K instead of browsing with Windows Explorer.  You will have much more control.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: how click on a song, it is added to the default playlist and played

Reply #12
maybe I misunderstood but if I disable enqueue, every time I click on a song the file I previously had in the playlist is deleted.
Yes.  That's why we use a dedicated playlist for shell integration.

I have the discography of many singers and I would like to click on the entries of the songs that I seem to remember that I like and I would like to hear them directly
Use a library search panel in FB2K instead of browsing with Windows Explorer.  You will have much more control.

thanks but isn't what I m looking for :(

Re: how click on a song, it is added to the default playlist and played

Reply #13
You can't do what you want the way you want, but you refuse to use a method which would get you nearer your goal.  OK, your loss.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: how click on a song, it is added to the default playlist and played

Reply #14
thanks but isn't what I m looking for :(
Your other option is to install another player that will do this--AIMP can be set up this way--and just use it in those cases.

Re: how click on a song, it is added to the default playlist and played

Reply #15
Are you sure there isn't a component that has this function? :(

Components like Facets can not help, since like fooball said, you're not using FB2K to browse your library, you're using Explorer.

I can offer two workarounds. 1) OLD workaround: .BAT file -

A batch file like this can work, but only if you have the foobar option in Playback menu > 'Playback Follows Cursor' enabled(?) -

Code: [Select]
@echo off
"C:\FB2K\foobar2000.exe" /add %1 %2 %3
timeout 2
"C:\FB2K\foobar2000.exe" /play
exit

^ Paste into Notepad, change the path to your foobar2000.exe, and File > Save as and type name "foobar2000 add+play.bat" and save in a folder somewhere. (Make sure file extension is .bat and not .txt)

Open this folder in Explorer, and right-click the file > Copy. Now type in the address bar, shell:sendto - to open the SendTo folder, then right-click a blank space > Paste Shortcut. (You can rename the shortcut if you like)

Now right-click the shortcut > Properties, and select Run: Minimized box (This is why using a shortcut, so the command window does not pop-up). You can also use the Change Icon... button if you like to give it the foobar icon (browse to foobar2000.exe)

Finally ... right-click a music file or folder > SendTo > foobar2000 add+play

(I'm posting this for any future reference since I suspect you would not really want to go to all this trouble. A further workaround would be to edit the Windows registry to run the batch file by default when you double-click a file (instead of right-click), but I only use portable foobar, so I have no registry entry to test. Someone like Case could probably help point to the correct registry keys - but again this is a lot of workaround)

...

2) NEW workaround: JS script -

edit. I use JScript Panel script, if it can help me

If I knew how to use it! ;D  (Hahahah)

Interesting idea. What sample script(s) do you use?

Alternative to the above, I tried adding something like this to a script (or add to existing function if already present) -

Code: [Select]
function on_playlist_items_added() {
if (plman.GetPlaylistName(plman.ActivePlaylist) == 'Windows Explorer') {
if (!fb.IsPlaying) {
fb.Play();
}
}
}

... And it works, but probably should be tweaked a bit. 'Windows Explorer' should be changed to whatever the name of the playlist set in Preferences > Shell Integration - so it only starts playback on this playlist.

Again, Playback menu > 'Playback Follows Cursor' needs to be enabled for this as well, so that foobar plays the newly added, selected track. Or I imagine that can be fixed in the script too.

(I'll leave it at that for someone who actually knows what they're doing in JScript to help)

Re: how click on a song, it is added to the default playlist and played

Reply #16
You can't do what you want the way you want, but you refuse to use a method which would get you nearer your goal.  OK, your loss.

sorry but I dont' like use FB2K to browse my library but thanks for the advice :)

I haven't enable Playback Follows Cursor.  I tried enabling it but it doesn't seem to change anything, what is this option supposed to do?

Re: how click on a song, it is added to the default playlist and played

Reply #17
Are you sure there isn't a component that has this function? :(

Components like Facets can not help, since like fooball said, you're not using FB2K to browse your library, you're using Explorer.

I can offer two workarounds. 1) OLD workaround: .BAT file -

A batch file like this can work, but only if you have the foobar option in Playback menu > 'Playback Follows Cursor' enabled(?) -

Code: [Select]
@echo off
"C:\FB2K\foobar2000.exe" /add %1 %2 %3
timeout 2
"C:\FB2K\foobar2000.exe" /play
exit

^ Paste into Notepad, change the path to your foobar2000.exe, and File > Save as and type name "foobar2000 add+play.bat" and save in a folder somewhere. (Make sure file extension is .bat and not .txt)

Open this folder in Explorer, and right-click the file > Copy. Now type in the address bar, shell:sendto - to open the SendTo folder, then right-click a blank space > Paste Shortcut. (You can rename the shortcut if you like)

Now right-click the shortcut > Properties, and select Run: Minimized box (This is why using a shortcut, so the command window does not pop-up). You can also use the Change Icon... button if you like to give it the foobar icon (browse to foobar2000.exe)

Finally ... right-click a music file or folder > SendTo > foobar2000 add+play

(I'm posting this for any future reference since I suspect you would not really want to go to all this trouble. A further workaround would be to edit the Windows registry to run the batch file by default when you double-click a file (instead of right-click), but I only use portable foobar, so I have no registry entry to test. Someone like Case could probably help point to the correct registry keys - but again this is a lot of workaround)

...

2) NEW workaround: JS script -

edit. I use JScript Panel script, if it can help me

If I knew how to use it! ;D  (Hahahah)

Interesting idea. What sample script(s) do you use?

Alternative to the above, I tried adding something like this to a script (or add to existing function if already present) -

Code: [Select]
function on_playlist_items_added() {
if (plman.GetPlaylistName(plman.ActivePlaylist) == 'Windows Explorer') {
if (!fb.IsPlaying) {
fb.Play();
}
}
}

... And it works, but probably should be tweaked a bit. 'Windows Explorer' should be changed to whatever the name of the playlist set in Preferences > Shell Integration - so it only starts playback on this playlist.

Again, Playback menu > 'Playback Follows Cursor' needs to be enabled for this as well, so that foobar plays the newly added, selected track. Or I imagine that can be fixed in the script too.

(I'll leave it at that for someone who actually knows what they're doing in JScript to help)


I really don't know how to thank you for all the work you've done. Now I'll try and tell you if I can follow your advice :)

I use the playlist of  JScript Panel with Playlist Organizer

ok, I understand now that the first procedure with the .bat file takes the same time as right clicking on the song or dragging it, so I would exclude it.

maybe I'll ask for help in the JScript thread. I think I've bothered you all enough already and I thank you all :)


Re: how click on a song, it is added to the default playlist and played

Reply #18
OLD workaround: .BAT file -
...
Nice!  I love .bat scripting.  That's an alternative to drag&drop.

I don't know what is "library search panel in FB2K"
Which interface are you using?  I don't use CUI (Columns User Interface) so somebody else will have to explain.

DUI (Default User Interface) lets you adjust the FB2K (foobar2000) screen layout to suit your requirements, it's a fundamental thing which makes FB2K stand out from other music players.  Assuming you're using that:

View > Layout > Enable layout editing mode

You should now see the various panels which make up your FB2K screen with blue outlines, some of which can be moved (if not locked).

I can't remember exactly how to do it (it was a long time ago that I made my set-up), perhaps somebody more experienced can take over, but you can replace an existing element or split an existing element, or add tabs to an element (each tab having a different function), and assign an element or tab as the "Media Library Search" or "Album List" UI element.

Media Library Search provides you a search box, and all tracks which match a search string will be listed in the panel.

Album List provides you with an Explorer-like folder and track view.

Both the above only look in places you have declared as your media library in Library > Configure, so if (for example) you plug in a USB drive and want to browse it, you must add the drive to the library first.

With either the Album List or Media Library Search, you get right-click options what to do with a track – eg add to a specific playlist.

If you go into View > Layout > Quick setup, there are a number of pre-defined screen layouts to use as starting points.  I'm sure some of them will already offer browser panels.  Before you start playing with any of this, I recommend setting up a fresh portable installation to experiment with rather than disturbing your current configuration.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: how click on a song, it is added to the default playlist and played

Reply #19
@Peter

It seems to me LauraQ's use-case isn't that outlandish, and would be easiest solved by adding an option to the shell integration so that, in addition to adding a file to a nominated playlist, it also triggers play.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: how click on a song, it is added to the default playlist and played

Reply #20
thanks but isn't what I m looking for :(
Your other option is to install another player that will do this--AIMP can be set up this way--and just use it in those cases.


Thanks, I hadn't seen your post and, to date, it's the best solution for what I'm looking for. I dream to find a solution with Foobar2000 but your solution is good:)

Re: how click on a song, it is added to the default playlist and played

Reply #21
OLD workaround: .BAT file -
...
Nice!  I love .bat scripting.  That's an alternative to drag&drop.

I don't know what is "library search panel in FB2K"
Which interface are you using?  I don't use CUI (Columns User Interface) so somebody else will have to explain.

DUI (Default User Interface) lets you adjust the FB2K (foobar2000) screen layout to suit your requirements, it's a fundamental thing which makes FB2K stand out from other music players.  Assuming you're using that:

View > Layout > Enable layout editing mode

You should now see the various panels which make up your FB2K screen with blue outlines, some of which can be moved (if not locked).

I can't remember exactly how to do it (it was a long time ago that I made my set-up), perhaps somebody more experienced can take over, but you can replace an existing element or split an existing element, or add tabs to an element (each tab having a different function), and assign an element or tab as the "Media Library Search" or "Album List" UI element.

Media Library Search provides you a search box, and all tracks which match a search string will be listed in the panel.

Album List provides you with an Explorer-like folder and track view.

Both the above only look in places you have declared as your media library in Library > Configure, so if (for example) you plug in a USB drive and want to browse it, you must add the drive to the library first.

With either the Album List or Media Library Search, you get right-click options what to do with a track – eg add to a specific playlist.

If you go into View > Layout > Quick setup, there are a number of pre-defined screen layouts to use as starting points.  I'm sure some of them will already offer browser panels.  Before you start playing with any of this, I recommend setting up a fresh portable installation to experiment with rather than disturbing your current configuration.


Thanks but I'm clumsy and it took me ages to configure foobar and I'm "terrified" at the idea of ​​having to change it. In addition, I really like the interface I have now and I don't want to see other tabs or other functions to enable... now I'll see if someone in the other thread finds a solution or, simply, I'll get used to using another player when I want to create my playlists

Re: how click on a song, it is added to the default playlist and played

Reply #22
@Peter

It seems to me LauraQ's use-case isn't that outlandish, and would be easiest solved by adding an option to the shell integration so that, in addition to adding a file to a nominated playlist, it also triggers play.

thanks :)

Re: how click on a song, it is added to the default playlist and played

Reply #23
I haven't enable Playback Follows Cursor.  I tried enabling it but it doesn't seem to change anything, what is this option supposed to do?
It plays the selected track next. Say you are playing track 3 in the playlist, and you single-click track 2 to select it, when track 3 finishes it will play the selected track 2 next. When you add tracks from Explorer they are automatically selected, so having this option on is needed to play the added tracks with the workarounds I mentioned. (Otherwise foobar remembers whatever previous track was played and resumes it)

I use the playlist of  JScript Panel with Playlist Organizer
Do you mean you are using this Playlist Organizer script for JScript Panel 3, is that correct? That would be easy to modify. On the other hand I would not want to mess with either of the JSP3 playlist scripts.

(If you're not sure what you're using exactly, it might help if you post a screenshot)

Re: how click on a song, it is added to the default playlist and played

Reply #24
I haven't enable Playback Follows Cursor.  I tried enabling it but it doesn't seem to change anything, what is this option supposed to do?
It plays the selected track next. Say you are playing track 3 in the playlist, and you single-click track 2 to select it, when track 3 finishes it will play the selected track 2 next. When you add tracks from Explorer they are automatically selected, so having this option on is needed to play the added tracks with the workarounds I mentioned. (Otherwise foobar remembers whatever previous track was played and resumes it)

I use the playlist of  JScript Panel with Playlist Organizer
Do you mean you are using this Playlist Organizer script for JScript Panel 3, is that correct? That would be easy to modify. On the other hand I would not want to mess with either of the JSP3 playlist scripts.

(If you're not sure what you're using exactly, it might help if you post a screenshot)


yes, I use  Playlist Organizer script.

I asked in the JScript Panel thread but no answer. I don't know if you can do something, I don't want the author not to want you to modify his work