summaryrefslogtreecommitdiff
path: root/nephilim/plugins/Lyrics.py
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-08-21 09:05:15 +0200
committerAnton Khirnov <wyskas@gmail.com>2009-08-21 09:05:15 +0200
commit25778fdfb7099fcbb98f17da2fb9c67715f6702f (patch)
treeefb4f8c16ec4ad105f4bf4fe3199889a7892af4c /nephilim/plugins/Lyrics.py
parentd62c9c0623020acd32ef6e41ab9d9c419b632798 (diff)
Lyrics: disconnect NetworkReply's signals before abort()ing.
Diffstat (limited to 'nephilim/plugins/Lyrics.py')
-rw-r--r--nephilim/plugins/Lyrics.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nephilim/plugins/Lyrics.py b/nephilim/plugins/Lyrics.py
index 64f3eb9..4eb696f 100644
--- a/nephilim/plugins/Lyrics.py
+++ b/nephilim/plugins/Lyrics.py
@@ -165,9 +165,11 @@ class Lyrics(Plugin):
"""A private convenience function to initiate fetch process."""
# abort any existing connections
if self.srep:
+ self.srep.finished.disconnect()
self.srep.abort()
self.srep = None
if self.lrep:
+ self.lrep.finished.disconnect()
self.lrep.abort()
self.lrep = None
self.song = song
@@ -196,7 +198,7 @@ class Lyrics(Plugin):
url.setQueryItems([('func', 'getSong'), ('artist', song.artist()),
('song', song.title()), ('fmt', 'xml')])
self.fetch2(song, url)
- self.connect(self.srep, QtCore.SIGNAL('finished()'), self.__handle_search_res)
+ self.srep.finished.connect(self.__handle_search_res)
def __handle_search_res(self):
url = None
@@ -219,7 +221,7 @@ class Lyrics(Plugin):
self.logger.info('Found Lyricwiki song URL: %s.'%url)
self.lrep = self.nam.get(QtNetwork.QNetworkRequest(url))
- self.connect(self.lrep, QtCore.SIGNAL('finished()'), self.__handle_lyrics)
+ self.lrep.finished.connect(self.__handle_lyrics)
def __handle_lyrics(self):
#TODO this should use Qt xml functions too