You are not logged in.
In an attempt to keep my applications light, I installed Moc - and it is terrific. Unfortunately, lastfmsubmit does not scrobble any of the tunes I play to Last.fm. I have tried the suggestions in this post with no luck:
http://bbs.archlinux.org/viewtopic.php?id=69036
It isn't throwing any obvious errors, so I am unsure how to pinpoint what the problem is: has anyone else encountered -and solved- this issue?
Last edited by jasonwryan (2009-09-24 03:44:31)
Offline
Maybe try mpd+client+mpdscribble all are on mpd wiki page in our wiki
Shell Scripter | C/C++/Python/Java Coder | ZSH
Offline
Maybe try mpd+client+mpdscribble all are on mpd wiki page in our wiki
That was going to be my fallback: but I really like MOC and would like to keep it (plus, it's too early in the piece to admit defeat)...
Offline
I have it working with this setup:
moc-devel 2.5.0-2 [AUR]
lastfmsubmitd 1.0.5-3 [community]
And this moc script: http://lukeplant.me.uk/blog.php?id=1107301687
Make sure your script is executable (i.e.: chmod +x)
Edit for more info:
My ~/.moc/config has this line:
OnSongChange = "/home/chimo/.moc/scripts/moc_submit_lastfm --artist %a --title %t --length %d --album %r"
Make sure you've put your lasfm account info in /etc/lastfmsubmitd.conf
As mentioned in the post you linked to make sure "/var/spool/lastm [...] [is] read/write to non-root user"
To see the debug/error messages from lastfmsubmitd, you can start it with:
lastfmsubmitd --debug --no-daemon
Last edited by chimo (2009-09-01 00:57:17)
Offline
Thanks for the help chimo. I'm not sure why I can't get it to work, but when I debug it I get:
lastfmsubmitd: no account info found; exiting
This despite the fact that in /etc/lastfmsubmitd.conf, I have the following (which I am pretty sure constitutes account info):
[account]
user: myusername
password: mypassword
/edit
OK, sorted that: seems that permissions need to be 755, not 0600 as specified in /etc/lastfmsubmitd.conf
Still not working, however...
Last edited by jasonwryan (2009-09-01 22:05:57)
Offline
Hmm, my permissions look like this:
-rw------- 1 root root 332 2009-08-30 18:52 /etc/lastfmsubmitd.conf
Then again, my lastfmsubmitd is started at boot by root via the DAEMONS section of /etc/rc.conf, so I guess it makes sense.
Is there anything unusual in your /var/log/lastfm/lastfmsubmitd.log file?
(I just noticed that if the daemon doesn't get a connection on 1st try, it stays in the sleep/retry loop forever throwing "ERROR: Handshake failed: [Errno socket error] [Errno -3] Temporary failure in name resolution" errors regardless of if the network has been started after the 1st failed attempt -- but that might be a whole different issue.)
Last edited by chimo (2009-09-02 05:03:18)
Offline
Thanks for perservering with thhis chimo.
Running
lastfmsubmit --debug --no-daemon
Now returns
Handshake: successful
which leads me to believe that there is now a connection with last.fm. However, no sign of my songs being added to my account.
Oddly, I don't have a /var/log/lastfm/lastfmsubmitd.log file - so difficult to tell where it is all going pear shaped...
Offline
Hmm, interesting.
As per the INSTALL file of the source, you can add this to the /etc/lastfmsubmitd.conf file to specify where you'd like the logs to be saved:
[paths]
log: /var/log/lastfm/lastfm.log
If you do this, make sure you specify a path where the user running the daemon has read/write access.
Also, may I ask which moc script and lastfmsubmitd package (and version) you're using and where they're from?
Offline
I'm running moc-devel 2.5.0-2 from AUR and lastfmsubmitd 1.0.5-3 (from community, I think). The script is the one you pointed me to above...
Offline
Well, the "Handshake: successful" message is definitely good!
Any luck with specifying a log path somewhere such as in your /home directory?
You probably know this already but just to make sure: the script only submits once the song is past its mid-point.
Along with the lastfmsubmitd daemon in --debug mode, you can try playing a song with moc and then calling the script manually like this:
./moc_submit_lastfm -a "Green Day" -t "Take Back" -A "Nimrod" -l 01:09
Where:
-a is artist
-t is title
-A is album
-l is length
edit: the info you call the script with must match the song that's playing
And see if it quits early or if something else happens. By default the script isn't too verbose in terms of error/warning messages but you can add some "print" statements here and there to see what happening if you suspect it terminates in failure. I know I did this once, but can't remember what for.
Last edited by chimo (2009-09-03 23:37:39)
Offline
Thanks chimo (sorry about the belated response, I was on holiday with the family without _any_ internet access...)
I've specified the log to my home directory, but the daemon isn't generating a file there.
I tried running the script manually, but got this:
PID file found. This means that mocstat is already running.
Run mocstat -f to force starting it.
I really appreciate the help; but feel this is really amounting to an issue that is not worth the ongoing investment... I am more interested in solving it for it's own sake (the challenge) than for scrobbling tracks at this point. I'm prepared to call it quits if you are
Offline
Hey, no worries -- I hope you had great holidays!
I tried running the script manually, but got this:
PID file found. This means that mocstat is already running. Run mocstat -f to force starting it.
It looks like you tried running "mocstat" and not "lastfm-mocp" (2nd script) -- or "moc_submit_lastfm" as it's called on the author's website. Can you verify this?
I am more interested in solving it for it's own sake (the challenge)
Same here, gotta solve the puzzle (it's almost a disorder, really).
Then again, don't feel obligated to indulge my obsession.
Offline
OK: aside from the fact that I was running the wrong script (d00fus)...
I'm now running lastfm-mocp, and when I try to issue it manually, I get:
.moc/lastfm-mocp -a "Jackie Orszaczky" -t "Madeleine" -d "5:24" -r "Deserted Downtown"
Traceback (most recent call last):
File ".moc/lastfm-mocp", line 76, in <module>
log = lastfm.logger('MOC')
AttributeError: 'module' object has no attribute 'logger'
I'm not sure who is indulging who's obsession here; but I really appreciate the assistance...
Offline
Hi again,
Okay. Turns out the script on the MOC website is quite different (older version) than the one I pointed to in an earlier post.
Would you mind getting the one off the developer's website and replacing your current script with this newer version?
According to the timestamps, the one on the MOC website is almost 1.5 years older than the other:
26th of January, 2007.
26 Jun 2008 23:26
Offline
Thanks chimo. This is where I am now: running the script you linked to, logs show:
2009-09-07 20:03:13,244 lastfmsubmitd[8992] INFO: Starting
2009-09-07 20:03:14,180 lastfmsubmitd[8992] INFO: Handshake sucessful
...but nothing gets scrobbled. If I call the script manually, I get:
moc_submit_lastfm: error: no such option: -d
So, perhaps I am inching closer
Offline
That's because the switches are:
Where:
-a is artist
-t is title
-A is album
-l is length
There's no "d" or "r"
Offline
Good god, this is going from bad to worse. Is there no end to my ineptitude?
Just to clarify, the entry in my config should look like this:
OnSongChange = "/home/jason/.moc/moc_lastfm_submit --artist %a --title %t --length %l --album %A"
...in my defence, the instructions in the script do specify
OnSongChange = "/path/to/moc_submit_lastfm --artist %a --title %t --length %d --album %r"
Last edited by jasonwryan (2009-09-07 08:38:27)
Offline
The entry in your ~/.moc/config file was right.
It should be:
OnSongChange = "/path/to/moc_submit_lastfm --artist %a --title %t --length %d --album %r"
The "%a %t %d %r" you see there are just format specifiers or variables for the python script (at least I think that's what they're for. I don't know python well enough to bet my life on that). I do know that they have nothing to do with the switches though.
In your defense, there are switches on that line: --artist, --title, --length and --album.
"-a, -t, -l, -A" are just the short version of the same thing.
Either way, don't beat yourself up. It is confusing.
Last edited by chimo (2009-09-07 09:26:55)
Offline
Well, I am sort of moving from confused to demented.
I tried running the script manually, with the correct switches - but still no go. The log is showing a new error, though:
2009-09-08 18:18:17,572 lastfmsubmitd[2948] INFO: Backing off, will retry in 2:00
2009-09-08 18:20:17,689 lastfmsubmitd[2948] ERROR: Handshake failed: [Errno socket error] [Errno -3] Temporary failure in name resolution
So, from what I can tell, I am making some progress. The bad news is, it appears to be backwards...
/edit
OK. I'm done. Restarted lastfmsubmitd and lastmp annd got a successful handshake, but still nothing being scrobbled.
//edit
Fixed! Changed permissions on /etc/lastfmsubmitd.conf to 755 (not 0600 as stated in the file) and /var/spool/lastfm to 777 and it works...
Last edited by jasonwryan (2009-09-24 03:46:12)
Offline