From 7dce103d9056d38a6500859a26f54069122db4fc Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 7 Jan 2011 20:18:40 +0100 Subject: [PATCH 1/2] Fix crash in Last.fm frontend if pylast was not installed or frontend not configured --- mopidy/frontends/lastfm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mopidy/frontends/lastfm.py b/mopidy/frontends/lastfm.py index e91dd272..c4ea73c4 100644 --- a/mopidy/frontends/lastfm.py +++ b/mopidy/frontends/lastfm.py @@ -54,7 +54,8 @@ class LastfmFrontend(BaseFrontend): self.thread.destroy() def process_message(self, message): - self.connection.send(message) + if self.thread.is_alive(): + self.connection.send(message) class LastfmFrontendThread(BaseThread): @@ -68,7 +69,7 @@ class LastfmFrontendThread(BaseThread): def run_inside_try(self): self.setup() - while True: + while self.scrobbler is not None: self.connection.poll(None) message = self.connection.recv() self.process_message(message) From d32d4b2cad7750c5021428ac958da5025bfd00c1 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 7 Jan 2011 20:38:48 +0100 Subject: [PATCH 2/2] Release v0.2.1 --- docs/changes.rst | 13 +++++++++++++ mopidy/__init__.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index 9e895419..3232cfcc 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -5,6 +5,19 @@ Changes This change log is used to track all major changes to Mopidy. +0.2.1 (2011-01-07) +================== + +This is a maintenance release without any new features. + +**Bugfixes** + +- Fix crash in :mod:`mopidy.frontends.lastfm` which occurred at playback if + either :mod:`pylast` was not installed or the Last.fm scrobbling was not + correctly configured. The scrobbling thread now shuts properly down at + failure. + + 0.2.0 (2010-10-24) ================== diff --git a/mopidy/__init__.py b/mopidy/__init__.py index 5e1b26de..350fc8d7 100644 --- a/mopidy/__init__.py +++ b/mopidy/__init__.py @@ -3,7 +3,7 @@ if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') def get_version(): - return u'0.2.0' + return u'0.2.1' class MopidyException(Exception): def __init__(self, message, *args, **kwargs):