You are not logged in.
Couldn't come up with a better topic title. Sorry.
Anyways, I'm having a bit of a problem with console mp3 players.
I want to use Thunar (I use XFCE4) to start mp3 files just by clicking on them. That's simple to fix.
What I'm having a problem with though, is having the player start another song when I click on another.
Mplayer and various others just start another process, which is not what I want.
And some others queue up the songs, which isn't what I want either.
And those that actually can do that, they can't play the song on repeat, so that doesn't work for me either.
I've tried every console player in all repositories I could find, none did what I wanted. So I've thought about two perhaps possible solutions. First is using killall to close the player and start it again. But Thunar's "open with" commands can't handle operators as far as I've seen. Maybe calling a bash script would be possible, but can it use %f from thunar? Though, I know nothing about scripting, so I can't really fix that on my own. The second solution is using XMMS or any other GUI player which I know all those functions work in, but hiding the interface, can that be done?
Summary:
I want to use thunar to start playing mp3 files in the background, easily switching to another song by clicking on another.
Greatly appreciated if someone can find a solution to my problem.
Last edited by Aziere (2007-03-18 09:20:11)
Offline
How about a script? I do not know thunar, but it should give your script a list of files you selected. For a player I suggest cmus, which can be controlled externally via cmus-remote. So, write down a script like
if [ cmus_is_not_running ]; then
cmus --do_what_you_want
else
cmus-remote --do_what_you_want
done
I believe there are many other players which can be controlled from external.
Offline
In xmms you can deselect in Preferences/Options/Allow multiple instances.
As far as I know for mplayer/vlc there is under linux no similar trick available. There you have to use a scripting.
Offline
If you use mpd, you can call 'mpc clear' then 'mpc add <file>' and then 'mpc play' to play the song. Just wrap that up into a script, and presto.
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
With mp3blaster you can add items to the playlist with space and play them right away with enter. And in the playlist you can play them right away too. IIRC.
Offline
mocp is one more good ncurses player
IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686
Offline
I decided to create a script around mplayer after all. Although it ended up different than what I intended, I feel it's pretty useful as it is.
#!/bin/bash
if [ "$(pidof mplayer)" ]
then
killall mplayer
fi
mplayer "$1"
Marking the topic as solved now.
Offline