url checks for add torrent
This commit is contained in:
parent
b6faa81c26
commit
d953c8d8b4
|
@ -64,7 +64,7 @@ class AddTorrentUrl:
|
|||
self.response = self.dlg.run()
|
||||
url = self.entry.get_text()
|
||||
self.dlg.destroy()
|
||||
if self.response == 1:
|
||||
if self.response == 1 and deluge.common.is_url(url):
|
||||
return url
|
||||
else:
|
||||
return None
|
||||
|
|
|
@ -102,7 +102,9 @@ class MenuBar:
|
|||
def on_menuitem_addurl_activate(self, data=None):
|
||||
log.debug("on_menuitem_addurl_activate")
|
||||
from addtorrenturl import AddTorrentUrl
|
||||
functions.add_torrent_url(AddTorrentUrl().run())
|
||||
result = AddTorrentUrl().run()
|
||||
if result is not None:
|
||||
functions.add_torrent_url(result)
|
||||
|
||||
def on_menuitem_clear_activate(self, data=None):
|
||||
log.debug("on_menuitem_clear_activate")
|
||||
|
|
Loading…
Reference in New Issue