Page 1 of 1

ShellFm

Posted: Thu 03 Apr 2008, 09:33
by aragon
Home: http://nex.scrapping.cc/shell-fm/
Version: 0.7
shell-fm is a lightweight, console-based player for Last.FM radio streams. It's pretty small (the binary is currently a little smaller than 60K, or 50K when stripped) and it has most features the "official" player has, if not even a few more.
Compiled an tested in 4.31.

After installation you will first have to setup your shell-fm.rc at /root/.shell-fm/shell-fm.rc . There is a template File at the folder to not mess up an eventualy allready existing rc-File. The options are self-explanatory.

Usage is simple.
- There's a starter at Multimedia => ShellFM
- If you did not setup your shell-fm.rc you will be asked for your login-details. If you have setup it will automatically login.
- if you're using a proxy, you will definitely have to setup the rc-file.
- If you have defined a default-radio in the rc-file just start shell-fm and the default will autoplay.
- If you don't have, start shell-fm with 'shell-fm lastfm://your-link-to-a-stream' in a shell. e.g 'shell-fm lastfm://artist/Bugge%2520Wesseltoft/similarartists'

A little help is 'shell-fm -h'.
While running shell-fm, you will find all options by pressing '?'.

Have fun
aragon

Posted: Thu 03 Apr 2008, 11:01
by HairyWill
Thanks for posting this I did toy for a while with packaging it up with instructions and a graphical launcher but then moved on to something else. What I really wanted to do was to launch the player and then build a gtkdialog app to control it via the socket interface, but I don't think I ever managed to work out how to control it like this.

It is so much lighter than the bloated qt based LastFmPlayer which I think is kicking round the forum somewhere. To be honest recently I have just been using the lash based player on the website but again that is a horrendous resource waste and the website is so loaded with AJAX that browsing it is starting to get quite painful.

The icon in the pet is at /usr/share/mini-icons in my pup muppy008 this is actually a symlink to /usr/local/lib/X11/mini-icons this means that the icon doesn't get installed. I suspect that the installer doesn't cope with symlinked dirs but am surprised I wasn't aware of it before now.

By default clicking on the menu entry gets an rxvt window that closes very quickly. You might consider repackaging with the default username and password lines commented out in the rc file, this way it will ask you for login credentials. As you stated taking the effort to edit the rc file with your credentials avoids having to enter the login details at all.

For anyone interested you can signup for a free LastFM account here
https://www.last.fm/join/
There is a rather small puppylinux group, 3 more members and we will start generating a group chart. I imagine that will be rather ecclectic.
http://www.last.fm/group/Puppy+Linux
There is also a shell-fm user group
http://www.last.fm/group/shell-fm

When it is running you can select a stream by hitting r and then entering a radio url such as
globaltags/goa
artist/The Eagles/similarartists
artist/Kings of Leon/fans

happy scrobbling

Posted: Thu 03 Apr 2008, 13:52
by aragon
Hi Will,

thanks for your hints. I've repackaged it, and now everything should be fixed. Updated first post.

Cheers
aragon

Posted: Wed 25 Jun 2008, 14:49
by aragon
Updated to 0.5. See main post.

cheers
aragon

Posted: Tue 16 Sep 2008, 13:06
by aragon
Updated to 0.6. See main post.

cheers
aragon

Posted: Thu 18 Dec 2008, 16:51
by HairyWill
I've been playing around with this recently.
shell-fm can now be controlled over a network interface using netcat ie

Code: Select all

# echo "info" | nc localhost 54311
np: Ultravox - Vienna
COMMANDS
This section describes the commands shell-fm's network interface knows. To use the interface, you must provide a valid value to the bind option in your configuration or use the -i option on the command line. Then you can connect the specified port (54311 by default) and send one command at a time. You also have to hurry, since there is a very short timeout. Best thing would be if you used a script for accessing this interface. (See shell-fm-*/scripts/ for examples) This is a list of the known commands.

play lastfm://...
Play the given stream.
love
Love the currently played track.
ban
Ban the currently played track.
skip
Skip the currently played track.
quit
Quit.
info some-format-string
Evaluate the given format string (check the FORMAT FLAGS section) and return the formatted information.
pause
Pause.
discovery
Toggle discovery mode on/off.
tag-artist some-comma-separated-tags
Tag the artist of the currently played track.
tag-album some-comma-separated-tags
Tag the album of the currently played track.
tag-track some-comma-separated-tags
Tag the currently played track.
artist-tags
Returns the tags of the currently played tracks artist.
album-tags
Returns the tags of the currently played tracks album.
track-tags
Returns the tags of the currently played track.
stop
Stop stream.

I have also installed the lyrics fetcher from here:
moc-lyrics
The following command in my shell-fm.rc can be used to popup the lyrics of the current track in a separate window when I hit the o key. Should be a single line

Code: Select all

key0x6F = echo "Searching for lyrics" ; /root/.moc/moc-lyrics.pl --artist "%a" --title "%t" 2> /dev/null > /tmp/lyrics.txt && gxmessage -file /tmp/lyrics.txt || echo "No lyrics found"

Posted: Thu 18 Dec 2008, 18:13
by aragon
hi will,

i didn't understand half of what you're writing. but isn't thit the base for that:
...What I really wanted to do was to launch the player and then build a gtkdialog app to control it via the socket interface...
if yes, please...

aragon

Thank You!

Posted: Thu 19 Mar 2009, 06:57
by mulrah
Thank you for this! I was so sick of Pandora hogging my resources. This is smooth and a perfect fit for the whole Puppy experience. Nice work.

thank you for shell-fm

Posted: Tue 16 Jun 2009, 18:55
by kuapao
This is very useful. Thank you for sharing it! It has helped me to reuse an antiquated laptop as a last.fm music player.

I wonder what RTP is?

Posted: Wed 17 Jun 2009, 06:57
by aragon
kuapao: sorry, i don't understand your question

aragon

RTP

Posted: Wed 17 Jun 2009, 17:17
by kuapao
aragon wrote:kuapao: sorry, i don't understand your question

aragon
It's okay, I found it. I was asking about this setting in shell-fm: "P = enable/disable RTP". RTP stands for "record tracks to profile".

default music player in Puppy 4.2.0?

Posted: Mon 26 Oct 2009, 18:31
by kuapao
When I use shell-fm, it is able to play the track just fine (but doesn't bring up a player GUI, which is fine). I am curious, how is it playing back the track? I am looking in the process list and do not find any process that gives me a clue which application is playing back the song. Is it going directly to the sound driver?

Posted: Tue 27 Oct 2009, 07:43
by aragon
hi kuapao,

should be libmad. but you could specify an external app in the config-file.

info: there is a version 0.7 available, that i will compile today or tomorrow.

aragon

Posted: Fri 13 Nov 2009, 20:05
by aragon
Updated to 0.7. See main post.

cheers
aragon

thanks!

Posted: Wed 18 Nov 2009, 01:35
by kuapao
Thanks!

thanks!

Posted: Sat 21 Nov 2009, 18:44
by Dannello
Thank you so much for wrapping this into a pet, the flash player was beginning to stress my system, but the console player works beautifully, and I always love it when someone takes the time to make a .pet!