
Amarok2LibreFM
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
This script will scrobble your listening habits to LibreFM.
It depends on the 'lastfmsubmitd' daemon which is available in most repos otherwise you can get the source here: http://www.red-bean.com/decklin/lastfmsubmitd/
10 years ago
Added delay before the track is submitted, currently set at 33% (see main.js for more information)
10 years ago
Added delay before the track is submitted, currently set at 33% (see main.js for more information)
bugmenot1234
10 years ago
is the behavior that now i have amarok scrobbling to libre.fm only?
Report
esdaniel1
10 years ago
#1 You're not using Amarok's inbuilt LastFM scrobbling
#2 You've only configured a single Lastfmsubmitd daemon, with your LibreFM info and using the Amarok2LibreFM script
If you've answered 'yes' to both those then as long as there is not some other wonderful weirdness going on then you will just be scrobbling to LibreFM.
If you enable #1 then you should have both though I've not checked that myself, Shane's your man for that:
http://amarok.kde.org/blog/archives/568-Last.fm-support-in-Amarok-2.html
HTH
ed.
Report
bugmenot1234
10 years ago
i was using amarok in-build last.fm scrobbler to scrobble last.fm
then i was looking for way to scrobble libre.fm also, so I installed lastfmsubmitd and Amarok2LibreFM and configured it to my libre.fm account
when I checked websited i saw only libre.fm is scrobbled
i was excpecting built-in last.fm to scrobble to last.fm, and Amarok2LibreFM scrobble to libre.fm, but i have libre.fm scrobbling only
Report
esdaniel1
10 years ago
One option is to run a second daemon and modify the parameters used. You might like to download lastfmsubmitd source (http://www.red-bean.com/decklin/lastfmsubmitd/) and hack this yourself - line 28 of the file lastfmsubmitd (SERVER_URL = ). It's not so tough, the daemon is in python so no code to compile - just ensure you think about potential conflicts with lastfmsubmitd daemon and make the necessary changes. There's a setup script in source to help with install as well. A better approach is to run one daemon that takes a parameter specifying where to scrobble.
I suppose 'we' really should fork lastfmsubmitd so librefm has it's own dedicated daemon or better I think to encourage the daemon coder to create multiconfig for different scrobblers - submitting a patch to the coder is probably the most polite approach.
Report
bugmenot1234
10 years ago
it looks like this:
127.0.0.1 mycomp localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
i used thees steps: http://bugs.libre.fm/wiki/clients/amarok
i installed deamon, changed /etc/lastfmsubmitd.conf and then amarok2librefm
Report
esdaniel1
10 years ago
#2 I checked the Amarok2 code to see what urls they were communicating with... http://gitweb.kde.org/amarok/amarok.git?a=search&h=HEAD&st=grep&s=scrobble
My suggestion is that you should try and see what is taking place with Amarok by running it in debug mode (launch amarok from shell: <your shell prompt>amarok -d) to see what errors may be occurring with the LastFM scrobble then paste that info in a post here.
HTH
ed.
Report
bugmenot1234
10 years ago
Report
esdaniel1
10 years ago
a) turtle.libre.fm
b) post.audioscrobbler.com
Are they the same IP address?
Report
bugmenot1234
10 years ago
PING post.glb.audioscrobbler.com (195.24.233.57)
Report
emilo
10 years ago
Report
Gallaecio
10 years ago
Report
Gallaecio
10 years ago
2010-08-10 22:00:10,367 lastmp[4889] INFO: Starting
2010-08-10 22:00:10,368 lastmp[4889] ERROR: Can't connect or lost connection to MPD
lastfsubmit includes two daemos, and I guess "lastmp" is MPD. So, why could this be not working?
Report
esdaniel1
10 years ago
http://www.red-bean.com/decklin/lastfmsubmitd/
You've got a configuration issue with respect to MPD based on the log info you've shared thus far.
Report
Gallaecio
10 years ago
lastfmsubmitd: no account info found; exiting
I have both /etc/ files, configured like by default the lastmp.conf, and according to the lastfmcubmitd INSTALL file the lastfmcubmitd.conf.
I'll keep looking at it for an hour to try to find out. Thanks for the help :)
Report
Gallaecio
10 years ago
Change also permissions in /var/run/lastfm
Change /etc/lastfmsubmitd.conf to 775
Althogh I assume the last change was the one that actually did it. Found it in an Ubuntu forums. Will do the necesary changes to Chakra packages so this works from the beginning. Thanks a lot!
Report
Gallaecio
10 years ago
While trying to make fix the script not getting, I found out that Installing the TAR.GZ from Amarok placed the files into this archive directly into the [...]/scripts folder, instead of [...]/scripts/Amarok2LibreFM folder. Fixing this I got Amarok to recognize the script under "Installed Script".
Even so, I could not get the script working. These are the only *Libre* strings I get in Amarok's output:
[...]
amarok(6443)/kio (Slave) KIO::Slave::createSlave: createSlave "http" for KUrl("http://amarok.kde.org/scriptupdates/Amarok2LibreFM/version")
[...]
amarok(6443)/kio (KIOJob) KIO::SlaveInterface::dispatch: error 111 "http://amarok.kde.org/scriptupdates/Amarok2LibreFM/version"
[...]
amarok(6443)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "Amarok2LibreFM"
Is there a way I can get an output with more details about the script or why could it not be working? (if it is the script what's not working, of course).
Report
okurz
10 years ago
directly, not a subfolder and consequently not recognized.
After moving the script content to a subfolder "Amarok2LibreFM" AND installing and configuring lastfmubmitd, the script works.
And also, the scripts archive filename is still not correct for amarok to recognize as a script archive.
Report
esdaniel1
10 years ago
Report
Gallaecio
10 years ago
Report
Gallaecio
10 years ago
And I didn't noticed... It's time to take use of LibreFM! THANK YOU ALL! :)
Report
Gallaecio
11 years ago
This is the debug output in console, when I start Amarok. And this is what I get in the GUI:
There are exceptions caught in the script 'Amarok2LibreFM'. Please refer to the console debug output for more information.
Can someone tell me why?
Report
esdaniel1
11 years ago
So the info that helps me trace is here:
"11:56:07 Error: Unable to import qt.core: no such extension on Line: 14"
This refers to the includes in the companion script that provides the on/off toggle for the script being enabled:
Importer.loadQtBinding( "qt.core");
Importer.loadQtBinding( "qt.gui");
Importer.loadQtBinding( "qt.uitools" );
You should check that you've got those libs installed - I think the key package you're looking for is libqt4-scripttools.
HTH
ed (esdaniel)
Report
Gallaecio
11 years ago
Report
thenktor
11 years ago
Report
esdaniel1
11 years ago
function onTrackChange() {
if (config["showChange"]) {
var currentTrack = Amarok.Engine.currentTrack();
var wait_to_update = currentTrack.length * 0.33; // i.e. wait 33% of track length played before updating (in milliseconds)
var qo = new QObject();
qo.event = function(qevent) {
if (currentTrack.path == Amarok.Engine.currentTrack().path) {
notify();
}
this.killTimer(qo.timerID);
}
qo.timerID = qo.startTimer(wait_to_update);
}
}
I'll update the script in due course but let me know if that works for you.
Report