Fix #299 preserve filename in gtkui when using 'add by url'
This commit is contained in:
parent
0d273690d5
commit
409a824d7d
|
@ -516,7 +516,11 @@ class AddTorrentDialog(component.Component):
|
||||||
|
|
||||||
def _download_from_url(self, url):
|
def _download_from_url(self, url):
|
||||||
import urllib
|
import urllib
|
||||||
filename, headers = urllib.urlretrieve(url)
|
import tempfile
|
||||||
|
import os.path
|
||||||
|
tmp_file = os.path.join(tempfile.gettempdir(), url.split("/")[-1])
|
||||||
|
filename, headers = urllib.urlretrieve(url, tmp_file)
|
||||||
|
log.debug("filename: %s", filename)
|
||||||
self.add_from_files([filename])
|
self.add_from_files([filename])
|
||||||
|
|
||||||
def _on_button_hash_clicked(self, widget):
|
def _on_button_hash_clicked(self, widget):
|
||||||
|
|
Loading…
Reference in New Issue