1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 11:19:18 +01:00

Fix signal emission in the di script

This commit is contained in:
David Sansome 2011-05-21 10:43:15 +00:00
parent a18146bf8a
commit 1822f8b75f
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class DigitallyImportedUrlHandler(clementine.UrlHandler):
return result return result
if self.service.PLAYLISTS[self.service.audio_type]["premium"] and \ if self.service.PLAYLISTS[self.service.audio_type]["premium"] and \
(len(self.service.username) == 0 or len(self.service.password) == 0): (len(self.service.username) == 0 or len(self.service.password) == 0):
self.service.StreamError.emit(self.tr("You have selected a Premium-only audio type but do not have any account details entered")) self.service.StreamError(self.tr("You have selected a Premium-only audio type but do not have any account details entered"))
return result return result
key = original_url.host() key = original_url.host()
@ -61,7 +61,7 @@ class DigitallyImportedUrlHandler(clementine.UrlHandler):
# Failed to get the playlist? # Failed to get the playlist?
if len(songs) == 0: if len(songs) == 0:
self.service.StreamError.emit("Error loading playlist '%s'" % reply.url().toString()) self.service.StreamError("Error loading playlist '%s'" % reply.url().toString())
return return
result = clementine.UrlHandler_LoadResult() result = clementine.UrlHandler_LoadResult()
@ -71,7 +71,7 @@ class DigitallyImportedUrlHandler(clementine.UrlHandler):
result.type_ = clementine.UrlHandler_LoadResult.TrackAvailable result.type_ = clementine.UrlHandler_LoadResult.TrackAvailable
result.media_url_ = songs[0].url() result.media_url_ = songs[0].url()
self.AsyncLoadComplete.emit(result) self.AsyncLoadComplete(result)
class DigitallyImportedServiceBase(clementine.RadioService): class DigitallyImportedServiceBase(clementine.RadioService):

View File

@ -66,7 +66,7 @@ class SkyFmService(DigitallyImportedServiceBase):
else: else:
clementine.task_manager.SetTaskFinished(self.task_id) clementine.task_manager.SetTaskFinished(self.task_id)
self.task_id = None self.task_id = None
self.StreamError.emit(self.tr("Invalid SKY.fm username or password")) self.StreamError(self.tr("Invalid SKY.fm username or password"))
return return
# Now we can load the playlist # Now we can load the playlist