LastamaroK

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

EDIT: since the 1.4.1 version, Amarok can read last.fm radio without any script. Get Amarok 1.4.1 at http://amarok.kde.org/ !

LastamaroK allows to play last.fm radios ( http://last.fm/ ) in amaroK, and to use some basic controls as love/skip/ban.

LastamaroK can be integrated in both Firefox and Konqueror.

More informations about using LastamaroK are in the Readme.

LastamaroK is based on the lastFMProxy by Vidar Madesn ( http://vidar.gimp.org/?page_id=50 ).

LastamaroK depend of amaroK ;-), python, and Tkinter (packages python*.*-tk in many distributions).
Last changelog:

13 years ago

*Version 0.4.0:
-Add a second (or more) entry in the playlist for using the Amarok forward button.
-Add a hitory of recent played radio
-New 'Record to profil' option<
-Fix the 'menu entry wich not appear' bug

*Version 0.3.1 (since 0.3.0):
-new error message when Tk is missing
-new 'tune neighbour radio' entry in the context menu

vidak

13 years ago

This is not the best solution, but I didn' t find any other way...
kstreamripper can be used to rip the last.fm stream the following way: you start the stream using your browser&amarok, then start kstreamripper, and rip the address http://localhost:1882/lastfm.mp3
(the same as in the previous post, except the extension). The advantage of this process is that the kstreamripper writes the ID3 tags automatically (just the title and author fields).
The disadvantage is that kstreamripper takes the stream from amarok, so while recording you cannot listen to it - and in addition you need amarok running with last.fm to have the stream present...

Report

C

Thesa

13 years ago

I think amaroK can't save lastfm streams.

But you can do that with kaffeine (or maybe vlc), by playing the uri http://localhost:1882/lastfm.m3u when lastamrok is configured and running (or using directly the lastFMProxy, which not depend on amaroK - the uri is in the description).

Report

AceTheFace

13 years ago

Thanks for this script. It's working great!

Report

EvilGnome

13 years ago

I'm sorry, but I can't figure this out. I've installed the script and have it running, and I've manually edited the firefox config thingy like you instructed. When clicking on a lastfm:// link,a notice in amaroK pops up telling me that the station was changed from my web browser. But nothing else happens. There are no new items in my playlist, pressing play does nothing. So I set the link's address in the script's configuration, but that didn't seem to have any effect. Finally I added a radio stream with the lastfm address, and when trying to play it, I get as far as "Connecting to stream source..." and then nothing. Please tell me how to use this.

Report

C

Thesa

13 years ago

The comportment of lastamarok in your computer is not... normal. I suppose you have stop and re-run lastamarok, and always nothing in the playlist.

Are you using an engine which can read streams (such as xine) ?

Check also the configuration of your firewall, lastamarok use in local the port you can configure in the configuration window (1882 by default).

Else... tell me your amaroK and KDE version, and I'll try to understand why it doesn't work.

Report

Hirs

13 years ago

Putting the version number in the directory name ends with two lastamarok scripts in amarok scsript manager. It's better avoid version numbers in directory names to make updates transparent

Report

C

Thesa

13 years ago

I changed my package. Thanks you for this comment.

Report

Berkout

13 years ago

That's a great job you did here. I find it so unconvenient to use another player for last.fm, this plugin is really a nice idea. However, looks like it won't work properly on my machine. I am getting the following error message when i launch the plugin:

"Traceback (most recent call last): File "/home/berkout/.kde/share/apps/amarok/scripts/lastamarok-0.3.0.amarokscript/lastamarok.py", line 38, in ? import TkinterImportError: No module named Tkinter"

Any idea? That's a real shame, I'd really like to use this plugin :(

Report

tante

13 years ago

I had the same problem.

Since I use gentoo I checked the useflags for python and saw that tcltk is not activated by default.

So if you use gentoo just activate that useflag, if you use something else install the python tcltk package or compile it yourself.

Report

Berkout

13 years ago

Thanks, it's now working. I'm using suse 10, and the python-tk package was'nt installed ;)

I'm just a beginner in the pingouin world, there's still a lot to learn :p

Report

C

Thesa

13 years ago

Yes, my script use Tkinter. It's normally in the standard python distribution, but if Gentoo split the distribution... I'll add it in dependencies.

Report

BCMM

13 years ago

Gentoo doesn't split the python distribution as such, it just has options, as with most packages. So rather than saying "install tkiner on gentoo", you could put a note saying that python must be merged with the tcltk flag.

Report

C

Thesa

13 years ago

In fact, I have check for my distribution (Ubuntu), there are two package (one for python, one for tk).

It appear to be the same with Suse.

I have make an error message who ask the user to install a package named python*.*-tk or else, becaus I think it's the most current case.

I don't know Gentoo (I never use it), but I'll add your explanation in the readme. But I can't write about all the distributions! Tk is a dependency (it's now written), and users must know how to install it on their distributions...

Report

Hirs

13 years ago

I was about to write the same script, I hate to use two players.

I think you allready have in mind, but what about:
- Download cover art
- split Artist and song into the right columns, this way you can access the lyrics/wiki on the fly!

I have an issue with the firefox protocol handler, well, it just dosen't work :), it's like the function is never called, the user.js is never written, btw, I can do it manually, but what I have to set as program?

A 'tune neighbour radio' option in the track menu would be great

Let me know if I can help

Report

C

Thesa

13 years ago

>- Download cover art
>- split Artist and song into the right columns, this way you can access the lyrics/wiki on the fly!

Yes, I have already think to that but... There are no dcop function to do that in amaroK. For amaroK, lastfm radios are stream, and it show there as stream.

But if you know how to do this...

For Firefox... My function work only with the default profile, as set in the ~/.mozilla/firefox/profiles.ini If your profiles.ini is in anoher place or if you haven't a default profile, my function don't work...

To set it manually, go to about:config, add the string network.protocol-handler.app.lastfm with the value /home/yourusername/.kde/share/apps/amarok/scripts/lastamarok/lastamarok.py

Next, add the boolean network.protocol-handler.external.lastfm with the value True

>A 'tune neighbour radio' option in the track menu would be great

I'll add it in the next release.

Report

BCMM

13 years ago

The lyrics and wiki work with streams in amarok 1.4. I think what he's suggesting is fixing the tags so it works. At the moment, the title is "Artist - Title", the album is "last.fm" and the artist is blank. Can you fix it so that the artist and title tags are correct, i.e. just take the part of the string before the - and make it the artist, and use the part after as the title?

Also, I find that the metadata doesn't always update at the end of tracks.

Also, is it possible to make amaroK not report tracks listened this way to last.fm?

BTW, other than these few quirks I like this script a lot.

Report

C

Thesa

13 years ago

>he lyrics and wiki work with streams in amarok 1.4. I think what he's suggesting is fixing the tags so it works. At the moment, the title is "Artist - Title", the album is "last.fm" and the artist is blank. Can you fix it so that the artist and title tags are correct, i.e. just take the part of the string before the - and make it the artist, and use the part after as the title?

OK, I didn't understand... All about the metadata is the job of the LastFMProxy. I use its code, but I haven't write it. I will ask the developer to do this, but I can't promise something.

>Also, I find that the metadata doesn't always update at the end of tracks.
Yes, it's the fault of the lastFMProxy... Same problem.

>Also, is it possible to make amaroK not report tracks listened this way to last.fm?

I think amaroK don't report stream tracks, but last.fm do it automatically for its radios. But I'm not sure, so I will check.

>Also, is it possible to make amaroK not report tracks listened this way to last.fm?

Thank you!

Report

vidak

13 years ago

OK, you have sure have found this thing out, but maybe not: if you use a web browser to take a look at
http://localhost:1882/
while listening to last.fm, you can see handy infos (produced by lastfmproxy), including the cover...

Report

C

Thesa

13 years ago

Yes, I know ;-)

It's the web interface of the lastFMProxy.
First, I had think to removing it, but I finally left it.

The problem is not to get data (cover, etc.) from the lastfmproxy, but more to give them to Amarok (for the cover) or to change the metadata of the stream (for artist and album).

Report

vidak

13 years ago

Could it be possible to rewrite the lastfmproxy.py so it would use MP3-stream instead of icystream (which has only StreamTitle and StreamUrl properties)?

How does the original last.fm player handle the covers?

Report

BCMM

13 years ago

Yeah, it's not amaroK reporting the tracks because I tested with that turned off completely.

Last.fm does generally report radio, but the last.fm player has an option to turn this off, so it must be possible.

Thanks for the explanation about problems coming from upstream BTW.

Report

13 years ago

*Version 0.4.0:
-Add a second (or more) entry in the playlist for using the Amarok forward button.
-Add a hitory of recent played radio
-New 'Record to profil' option<
-Fix the 'menu entry wich not appear' bug

*Version 0.3.1 (since 0.3.0):
-new error message when Tk is missing
-new 'tune neighbour radio' entry in the context menu

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.4.0
updated Jul 02 2006
added May 27 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 5
System Tags addon