From ee4cef19887ee9715ef10e8b56cb66b588b8abf3 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 26 Aug 2010 18:56:36 +0200 Subject: [PATCH] Threadify Last.fm frontend --- mopidy/frontends/lastfm.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mopidy/frontends/lastfm.py b/mopidy/frontends/lastfm.py index 13a8f6b4..e0f1c978 100644 --- a/mopidy/frontends/lastfm.py +++ b/mopidy/frontends/lastfm.py @@ -11,7 +11,7 @@ except ImportError as e: from mopidy import get_version, settings, SettingsError from mopidy.frontends.base import BaseFrontend -from mopidy.utils.process import BaseProcess +from mopidy.utils.process import BaseThread logger = logging.getLogger('mopidy.frontends.lastfm') @@ -45,22 +45,22 @@ class LastfmFrontend(BaseFrontend): def __init__(self, *args, **kwargs): super(LastfmFrontend, self).__init__(*args, **kwargs) (self.connection, other_end) = multiprocessing.Pipe() - self.process = LastfmFrontendProcess(other_end) + self.thread = LastfmFrontendThread(other_end) def start(self): - self.process.start() + self.thread.start() def destroy(self): - self.process.destroy() + self.thread.destroy() def process_message(self, message): self.connection.send(message) -class LastfmFrontendProcess(BaseProcess): +class LastfmFrontendThread(BaseThread): def __init__(self, connection): - super(LastfmFrontendProcess, self).__init__() - self.name = u'LastfmFrontendProcess' + super(LastfmFrontendThread, self).__init__() + self.name = u'LastfmFrontendThread' self.daemon = True self.connection = connection self.lastfm = None