mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
Fix #299 preserve filename in gtkui when using 'add by url'
This commit is contained in:
parent
0d273690d5
commit
409a824d7d
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue