You are not logged in.

#1 2010-09-21 20:19:42

NecroWxrst
Member
From: /Germany/Aachen
Registered: 2010-09-02
Posts: 21
Website

MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

Hey folks!

I'm sorry if this topic was already discussed, but i was not able to find it using the board search!

My setup: mpd with ncmpcpp as frontend. Due to some problems with mpdscribble I switched to lastfmsubmitd with lastmp as bridge.
Versions:
* mpd 0.15.12-1
* ncmpcpp 0.5.5-1
* lastfmsubmitd 1.0.6-1

When I clear my current playlist with 'c' in ncmpcpp, i get an error in /var/log/lastfm/lastmp.log and this deamon exits:

2010-09-21 22:09:39,419 lastmp[4035] ERROR: Aborting: Traceback (most recent call last):
  File "/usr/bin/lastmp", line 237, in <module>
    daemon(cli)
  File "/usr/bin/lastmp", line 196, in daemon
    mo.observe()
  File "/usr/bin/lastmp", line 153, in observe
    self.wake()
  File "/usr/bin/lastmp", line 78, in wake
    song = Song(self.mpd.do.currentsong())
  File "/usr/bin/lastmp", line 29, in __init__
    self.artist = getattr(sobj, 'artist', '')
  File "/usr/lib/python2.6/site-packages/mpdclient2.py", line 270, in __getattr__
    return self[attr]
KeyError: 'artist'

As you can imagine: it is quite annoying, if you clear your playlists and every further title is not submitted to last.fm due to this error... Does anyone know how to fix this problem?

Cheers and thanks!
Chris

Last edited by NecroWxrst (2010-09-21 20:20:13)

Offline

#2 2010-09-21 20:44:18

broom
Member
Registered: 2008-01-21
Posts: 7

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

I have the same problem, but I didn't noticed the reason - clearing the playlist. I thought that crash happens randomly.
I think we should post a bug report to the program author.

P.S. My mpd client is ncmpc.

Offline

#3 2010-09-22 06:45:32

NecroWxrst
Member
From: /Germany/Aachen
Registered: 2010-09-02
Posts: 21
Website

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

Hey there!

If I'm not the only one with this problem, I think it would be the best to send a bug-report to the author. But where can I report this issue? When I search the Internet for lastmp or lastfmsubmitd, I get this homepage without contact information or bug-tracker: http://www.red-bean.com/decklin/lastfmsubmitd/

Greetz
Chris

Offline

#4 2010-09-22 15:01:22

broom
Member
Registered: 2008-01-21
Posts: 7

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

There is an e-mail in "man lastfmsubmitd":
Decklin Foster <decklin@red-bean.com>

Offline

#5 2010-09-22 18:03:06

NecroWxrst
Member
From: /Germany/Aachen
Registered: 2010-09-02
Posts: 21
Website

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

Hey there!

Thanks for the email! The manpage did not come to my mind. I'll write an email to him and post his reply here.

Cheers
Chris

Offline

#6 2010-09-22 18:08:27

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

There's also a program called scrobby. It's written by the guy who wrote ncmpcpp. I've been using this scrobbler for quite a while (about 2 years I guess) and I never had any trouble with it.

Offline

#7 2010-10-08 18:43:15

sLite
Member
Registered: 2010-10-08
Posts: 1

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

In the meantime you can edit /usr/bin/lastmp and exchange the first few lines of class Song with the following snippet. Working fine for me and lastmp is surviving playlist clears.

class Song:
    def __init__(self, sobj):
        self.artist = ''
        if hasattr(sobj, 'artist'):
            self.artist = getattr(sobj, 'artist')
        self.title = ''
        if hasattr(sobj, 'title'):
            self.title = getattr(sobj, 'title')
        self.album = ''
        if hasattr(sobj, 'album'):
            self.album = getattr(sobj, 'album')
        self.time = int(0)
        if hasattr(sobj, 'time'):
            self.length = int(getattr(sobj, 'time'))
        self.file = ''
        if hasattr(sobj, 'file'):
            self.file = getattr(sobj, 'file')

I already wrote an email to the author with the suggested change but didn't get a reply so far.

Offline

#8 2010-10-08 20:01:18

NecroWxrst
Member
From: /Germany/Aachen
Registered: 2010-09-02
Posts: 21
Website

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

Hey sLite!

Thank you for the patch! But since the author of lastmp did not reply to my email i switched to scrobby which works quite fine (;

Cheers
Chris

Offline

#9 2011-06-16 21:31:42

totalizator
Member
Registered: 2010-09-09
Posts: 8

Re: MPD+lastfmsubmitd: Clearing my playlist is killing lastmp

Army wrote:

There's also a program called scrobby. It's written by the guy who wrote ncmpcpp. I've been using this scrobbler for quite a while (about 2 years I guess) and I never had any trouble with it.

Scrobby is great. Thanks man! I've been looking for something simple and reliable like this for ages.

Offline

Board footer

Powered by FluxBB