diff --git a/src/controller/player.py b/src/controller/player.py index b902e0e..c87f4c8 100644 --- a/src/controller/player.py +++ b/src/controller/player.py @@ -126,7 +126,7 @@ class audioPlayer(object): break transcoder.release() os.rename(temporary_path, path) - pub.sendMessage("change_status", status="") + pub.sendMessage("download_finished", file=os.path.basename(path)) # print(state) def __del__(self): diff --git a/src/utils.py b/src/utils.py index 05577b0..50f6589 100644 --- a/src/utils.py +++ b/src/utils.py @@ -62,5 +62,5 @@ def download_file(url, local_filename): done = int(100 * dl / total_length) msg = _(u"Downloading {0} ({1}%).").format(os.path.basename(local_filename), done) pub.sendMessage("change_status", status=msg) - pub.sendMessage("change_status", status="") + pub.sendMessage("download_finished", file=os.path.basename(local_filename)) return local_filename diff --git a/src/wxUI/mainWindow.py b/src/wxUI/mainWindow.py index 38918ec..06cd2af 100644 --- a/src/wxUI/mainWindow.py +++ b/src/wxUI/mainWindow.py @@ -99,4 +99,8 @@ class mainWindow(wx.Frame): saveFileDialog = wx.FileDialog(self, _(u"Save this file"), "", filename, _(u"Audio Files(*.mp3)|*.mp3"), wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) if saveFileDialog.ShowModal() == wx.ID_OK: return saveFileDialog.GetPath() - saveFileDialog.Destroy() \ No newline at end of file + saveFileDialog.Destroy() + + def notify(self, title, text): + self.notification = wx.adv.NotificationMessage(title, text, parent=self) + self.notification.Show() \ No newline at end of file