Hi! I revive this thread now that moc has this nyw songonchange-thing. How do I do to make it work with lastfm? If i understand, this was what the function was meant for? Is some stable plugin in the works or something? Why not a wiki for tutorials and explanations for moc?
Thanks, moc is great!
Submitted by spookylukey on Mon, 2008-07-14 22:40.
I wrote a script that uses OnSongChange, with the additional feature that it will wait until you have listened to half the track before submitting to last.fm. This means that skipping through a list will not result in lots of bogus submissions.
The function is just (and nothing more than) a mechanism to run a script when MOC starts playing a song. It can make easier writing a script for last.fm like this one: http://moc.daper.net/node/215 In this case the script polls MOC regulary to see if the song was changed but with OnSongChange MOC can notify the script.
The description is in config.example file in MOC sources (unstable version), it's nothing complex and IMHO it doesn't require a longer descrition.
Okey, but someone still has to write the script? Or can the existing script you linked be adapted to onsongchange? Is this lastfm-support meant to be included in 2.5-stable?
You don't need to roll your own script (unless you really want to). Just install lastfmsubmitd, the program has several utilities, one is lastfmsubmit --which is a python script. It submits your artist,title,length,album info to lastfm.
I use ubuntu, so the script is installed in /usr/lib/lastfmsubmitd/
Hi! I revive this thread now
Hi! I revive this thread now that moc has this nyw songonchange-thing. How do I do to make it work with lastfm? If i understand, this was what the function was meant for? Is some stable plugin in the works or something? Why not a wiki for tutorials and explanations for moc?
Thanks, moc is great!
script written
I wrote a script that uses OnSongChange, with the additional feature that it will wait until you have listened to half the track before submitting to last.fm. This means that skipping through a list will not result in lots of bogus submissions.
See here: http://lukeplant.me.uk/blog.php?id=1107301687
The function is just (and
The function is just (and nothing more than) a mechanism to run a script when MOC starts playing a song. It can make easier writing a script for last.fm like this one: http://moc.daper.net/node/215 In this case the script polls MOC regulary to see if the song was changed but with OnSongChange MOC can notify the script.
The description is in config.example file in MOC sources (unstable version), it's nothing complex and IMHO it doesn't require a longer descrition.
--
Damian Pietras - MOC developer
Okey, but someone still has
Okey, but someone still has to write the script? Or can the existing script you linked be adapted to onsongchange? Is this lastfm-support meant to be included in 2.5-stable?
Yes, someone must write a
Yes, someone must write a script. If it appears it will be at least posted on this site I think.
--
Damian Pietras - MOC developer
You don't need to roll your
You don't need to roll your own script (unless you really want to). Just install lastfmsubmitd, the program has several utilities, one is lastfmsubmit --which is a python script. It submits your artist,title,length,album info to lastfm.
I use ubuntu, so the script is installed in /usr/lib/lastfmsubmitd/
I have the following in my ~/.moc/config file:
OnSongChange = "/usr/lib/lastfmsubmitd/lastfmsubmit --artist %a --title %t --length %d --album %b"
I've been using it for a couple of weeks without issues.
xmonk