From 7bf8132335d70bcee17a8a99f326bd0abda02751 Mon Sep 17 00:00:00 2001 From: Et0h Date: Sat, 11 Jun 2016 15:10:45 +0100 Subject: [PATCH] Strip space from end of added URL and ignore empty URLs --- syncplay/ui/gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 6d9b127..6cbe5e3 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -801,7 +801,10 @@ class MainWindow(QtGui.QMainWindow): URIsToAdd = utils.convertMultilineStringToList(URIsTextbox.toPlainText()) self.updatingPlaylist = True for URI in URIsToAdd: - self.addStreamToPlaylist(URI) + if URI.endswith(u" "): + URI = URI[:-1] + if URI <> "": + self.addStreamToPlaylist(URI) self.updatingPlaylist = False @needsClient