From 0d2cd48316a443f1da8324ab64eafe065f284751 Mon Sep 17 00:00:00 2001 From: kanishka-linux Date: Sat, 30 Jun 2018 16:52:35 +0530 Subject: [PATCH] remove extra spaces from notification message --- kawaii_player/thread_modules.py | 8 +++++--- kawaii_player/widgets/playlist.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kawaii_player/thread_modules.py b/kawaii_player/thread_modules.py index 8b870b53..9a2e3003 100644 --- a/kawaii_player/thread_modules.py +++ b/kawaii_player/thread_modules.py @@ -1495,10 +1495,12 @@ def run(self): https_val = '' msg_val = '' if ui.discover_slaves: - send_notification('Started Process of Discovering. Make sure that other\ - slave-server is broadcasting itself') + notifymsg = ('Started Process of Discovering. Make sure that\ + other slave-server is broadcasting itself') else: - send_notification('Started Process of Discovering') + notifymsg = 'Started Process of Discovering' + notifymsg = re.sub(' +', ' ', notifymsg) + send_notification(notifymsg) if ui.discover_server: self.clear_list.emit('start') while ui.discover_server or ui.discover_slaves: diff --git a/kawaii_player/widgets/playlist.py b/kawaii_player/widgets/playlist.py index 784012de..a28035ae 100644 --- a/kawaii_player/widgets/playlist.py +++ b/kawaii_player/widgets/playlist.py @@ -1149,6 +1149,7 @@ def setup_slave_address(self, ipaddr=None): f.write(item) msg = ('Address of Slave is set to {}, now start media server\ and cast single item or playlist'.format(item)) + msg = re.sub(' +', ' ', msg) send_notification(msg) logger.info(msg) ui.slave_address = item