Added a progress bar for downloads in the application. Fixed a problem with format in Tidal
This commit is contained in:
@@ -88,8 +88,13 @@ class Controller(object):
|
||||
pub.subscribe(self.change_status, "change_status")
|
||||
pub.subscribe(self.on_download_finished, "download_finished")
|
||||
pub.subscribe(self.on_notify, "notify")
|
||||
pub.subscribe(self.on_update_progress, "update-progress")
|
||||
|
||||
# Event functions. These functions will call other functions in a thread and are bound to widget events.
|
||||
|
||||
def on_update_progress(self, value):
|
||||
wx.CallAfter(self.window.progressbar.SetValue, value)
|
||||
|
||||
def on_settings(self, *args, **kwargs):
|
||||
settings = configuration.configuration()
|
||||
self.reload_extractors()
|
||||
|
@@ -149,6 +149,7 @@ class audioPlayer(object):
|
||||
while True:
|
||||
state = media.get_state()
|
||||
pub.sendMessage("change_status", status=_("Downloading {0} ({1}%).").format(item.title, int(transcoder.get_position()*100)))
|
||||
pub.sendMessage("update-progress", value=int(transcoder.get_position()*100))
|
||||
if str(state) == 'State.Ended':
|
||||
break
|
||||
elif str(state) == 'state.error':
|
||||
|
Reference in New Issue
Block a user