Opened 12 years ago
Closed 9 years ago
#2169 closed bug (Fixed)
Add Torrent Dialog's ' Download Location' not set correctly when directory typed into Other->Location field
Reported by: | Serge | Owned by: | Calum |
---|---|---|---|
Priority: | minor | Milestone: | not applicable |
Component: | Unknown | Version: | 1.3.5 |
Keywords: | Cc: | slowrobot@gmail.com, inbox-sites@pvgoran.name |
Description
When I add a new torrent from Mozilla Firefox by choosing "Open with" it is difficult to set up desired save path in adding torrent dialog. I sighted that if I switch between tabs in that dialog then save path sets correctly, but else it sets to my home directory. I run it in KDE.
Attachments (2)
Change History (47)
comment:1 by , 12 years ago
Milestone: | 1.3.x → Future |
---|---|
Status: | new → pending |
comment:2 by , 12 years ago
Status: | pending → new |
---|
- In FireFox choose some URI with torrent-file; when FF ask what to do with it choose point "Open with Deluge"
- Deluge starts (or pops up if started -- no matter) and the "Add torrents" dialog brings up.
- Switch to options tab and try to choose a save path.
- Press Add button and see that save path (need to turn on this column first) is... your home directory.
I was trying to research this issue but as far as I see this maybe related to that I running KDE. And one more: if between 3 and 4 points above I switched between tabs inside the dialog save path was set correctly.
comment:3 by , 12 years ago
Milestone: | Future → 1.3.6 |
---|---|
Owner: | set to |
Status: | new → assigned |
Summary: | It is difficult to set up a save path → Add torrent dialog's 'save path' not set correctly in KDE |
Thanks I understand the issue now. This could well be a KDE specific issue but I will need to download a KDE distro in order to test it.
comment:4 by , 12 years ago
Cc: | added |
---|
I also have this exact same issue in Deluge 1.3.5 on MacOS 10.7.5 Re-adding the torrent (without exiting Deluge) will save to the user-specified location. Re-adding after restarting Deluge will ignore the user-specified location and save to $HOME.
comment:5 by , 12 years ago
This is odd as it has also been reported on Fedora F17
I will look into this further but I could not replicate on KDE specific distro and unless I can replicate it will be very difficult to determine the issue.
comment:6 by , 12 years ago
Summary: | Add torrent dialog's 'save path' not set correctly in KDE → Add torrent dialog's 'save path' not set correctly |
---|
comment:7 by , 12 years ago
I have gnome 3.4 in Fedora 17 and Arch linux and it happens to me too. I have the latest Deluge 1.3.5.
comment:8 by , 12 years ago
I have just downloaded and tested with a fresh virutalbox Fedora 17 and I still cannot replicate this. There must be something in the steps that is being omitted.
Are there any errors in logs?
comment:9 by , 12 years ago
Did you try like this?
Description of problem: When you add a torrent you should be able to download it to a user specified location on your hard disk. But in Deluge 1.3.5 when you select file->add a torrent->options->downloadlocation-> other(scroll down to the lowest in the menu). What ever location you set in "other" is not recognized by the application and it sets itself to default /home/user/Downloads.
So basically the "other" option is not working.
comment:10 by , 12 years ago
I could select any directory with the Other
option and it would select it and start downloading correctly.
Could try with a new Deluge config (-c switch) or test for yourself with a Virtualbox Fedora it may provide more information.
comment:11 by , 12 years ago
I could not make it download to my preferred folder with the Other option, Yet. The download starts but at the wrong location. I am using 64bit of Arch, Fedora. I tried both of them right now.
But about the config switch, how do I do it?
comment:12 by , 12 years ago
| But about the config switch, how do I do it?
deluge -c ~/deluge_config
Are you using libtorrent 0.16?
comment:13 by , 12 years ago
my libtorrent version is libtorrent: 0.15.9.0 in fedora 17.
I tried your method but I am getting the same behaviour. deluge -c ~/deluge_config
If there is a way I could post a log output I would be happy to post.
by , 12 years ago
Attachment: | deluge-log-partial.log added |
---|
comment:14 by , 12 years ago
The above log is from MacOS 10.7.5 and shows me adding a .torrent from $HOME/Downloads, specifying a save location of /var/tmp/, and you can see the torrent get added with options[download_location] set to $HOME instead of /var/tmp.
comment:15 by , 12 years ago
Same behavior on Natty with a fresh install of 1.3.1-1ubuntu2, by the way.
comment:16 by , 12 years ago
I have made a fedora screencast to show what I think is being reported and what I am seeing, just in case I have got the wrong end of the stick...
comment:17 by , 12 years ago
Yup that's the right flow. Except, in my case, I specified the directory by typing /var/tmp, which brings up the "Location" field in the "Select A Folder" dialog. When I do it your way, navigating to /var/tmp/ with the mouse, it works.
comment:18 by , 12 years ago
Summary: | Add torrent dialog's 'save path' not set correctly → Add Torrent Dialog's ' Download Location' not set correctly when directory typed into Other->Location field |
---|
Ah! I can finally replicate the issue by typing in the location field, thanks ferp.
Well now we know neither me nor anyone else here is crazy :P
comment:19 by , 12 years ago
Looking into this issue it appears that using get_current_folder()
in the file chooser will not return the correct folder in the above situation and the solution is to simply replace it with get_filename()
.
comment:20 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed 1.3-stable: aa969fd830
comment:21 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I applied your patch, but...
- In FireFox choose some URI with torrent-file; when FF ask what to do with it choose point "Open with Deluge"
- Deluge starts (or pops up if started -- no matter) and the "Add torrents" dialog brings up.
- Switch to options tab and try to choose a save path (using "Other..." option).
- Press Add button and see that save path (need to turn on this column first) is... STILL your home directory.
If I try to reopen torrent file and if I choose previously chosen (and therefore saved in pop up list which contain $HOME, Desktop, File system and "Other..." options) then Download location set correctly.
comment:22 by , 12 years ago
I still have the same issue too. The patch doesn't resolve it. thanks beaux_monde for bringing it up.
comment:24 by , 12 years ago
comment:25 by , 12 years ago
Please add the following log lines and post the log output from both working and non-working steps.
-
deluge/ui/gtkui/addtorrentdialog.py
diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index a26acf0..760c558 100644
a b def save_torrent_options(self, row=None): 406 406 if client.is_localhost(): 407 407 options["download_location"] = \ 408 408 self.glade.get_widget("button_location").get_filename() 409 log.error("DwnLoc filename: %s", self.glade.get_widget("button_location").get_filename()) 410 log.error("DwnLoc uri: %s", self.glade.get_widget("button_location").get_uri()) 411 log.error("DwnLoc curr fold: %s", self.glade.get_widget("button_location").get_current_folder()) 412 log.error("DwnLoc config: %s", options["download_location"]) 409 413 else: 410 414 options["download_location"] = \ 411 415 self.glade.get_widget("entry_download_path").get_text()
follow-up: 27 comment:26 by , 12 years ago
~$ deluge
** (deluge:16202): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags' ** (deluge:16202): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags' ** (deluge:16202): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags' Traceback (most recent call last): File "/usr/bin/deluge", line 9, in <module> load_entry_point('deluge==1.3.5', 'gui_scripts', 'deluge')() File "/usr/lib/python2.7/site-packages/deluge/main.py", line 132, in start_ui UI(options, args, options.args) File "/usr/lib/python2.7/site-packages/deluge/ui/ui.py", line 149, in __init__ from deluge.ui.gtkui.gtkui import GtkUI File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/__init__.py", line 1, in <module> from gtkui import start File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/gtkui.py", line 91, in <module> from addtorrentdialog import AddTorrentDialog File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/addtorrentdialog.py", line 413 log.error("DwnLoc curr fold: %s", self.glade.get_widget("button_location").get_current_ ^ SyntaxError: invalid syntax
comment:27 by , 12 years ago
Replying to beaux_monde:
~$ deluge
** (deluge:16202): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags' ** (deluge:16202): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags' ** (deluge:16202): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags' Traceback (most recent call last): File "/usr/bin/deluge", line 9, in <module> load_entry_point('deluge==1.3.5', 'gui_scripts', 'deluge')() File "/usr/lib/python2.7/site-packages/deluge/main.py", line 132, in start_ui UI(options, args, options.args) File "/usr/lib/python2.7/site-packages/deluge/ui/ui.py", line 149, in __init__ from deluge.ui.gtkui.gtkui import GtkUI File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/__init__.py", line 1, in <module> from gtkui import start File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/gtkui.py", line 91, in <module> from addtorrentdialog import AddTorrentDialog File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/addtorrentdialog.py", line 413 log.error("DwnLoc curr fold: %s", self.glade.get_widget("button_location").get_current_ ^ SyntaxError: invalid syntax
Sorry, it looks like I'm wrong
comment:29 by , 12 years ago
[ERROR ] 14:48:49 addtorrentdialog:411 DwnLoc filename: /home/serge [ERROR ] 14:48:49 addtorrentdialog:412 DwnLoc uri: file:///home/serge [ERROR ] 14:48:49 addtorrentdialog:413 DwnLoc curr fold: /home/serge [ERROR ] 14:48:49 addtorrentdialog:414 DwnLoc config: /home/serge [ERROR ] 14:48:51 addtorrentdialog:411 DwnLoc filename: /home/serge [ERROR ] 14:48:51 addtorrentdialog:412 DwnLoc uri: file:///home/serge [ERROR ] 14:48:51 addtorrentdialog:413 DwnLoc curr fold: /home/serge [ERROR ] 14:48:51 addtorrentdialog:414 DwnLoc config: /home/serge [ERROR ] 14:49:02 addtorrentdialog:411 DwnLoc filename: /home/serge [ERROR ] 14:49:02 addtorrentdialog:412 DwnLoc uri: file:///home/serge [ERROR ] 14:49:02 addtorrentdialog:413 DwnLoc curr fold: /home/serge [ERROR ] 14:49:02 addtorrentdialog:414 DwnLoc config: /home/serge [ERROR ] 14:49:35 addtorrentdialog:411 DwnLoc filename: /home/serge/temp [ERROR ] 14:49:35 addtorrentdialog:412 DwnLoc uri: file:///home/serge/temp [ERROR ] 14:49:35 addtorrentdialog:413 DwnLoc curr fold: /home/serge/temp [ERROR ] 14:49:35 addtorrentdialog:414 DwnLoc config: /home/serge/temp [ERROR ] 14:49:49 addtorrentdialog:411 DwnLoc filename: /home/serge/temp [ERROR ] 14:49:49 addtorrentdialog:412 DwnLoc uri: file:///home/serge/temp [ERROR ] 14:49:49 addtorrentdialog:413 DwnLoc curr fold: /home/serge/temp [ERROR ] 14:49:49 addtorrentdialog:414 DwnLoc config: /home/serge/temp
comment:30 by , 12 years ago
What is that log of, the bug? Please provide context.
Also please use the WikiFormatting code tags.
comment:31 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:33 by , 12 years ago
I cannot replicate any further issues to the one I fixed and you have not provided any more information which I asked for in my last comment, so I closed it.
comment:34 by , 12 years ago
It's a bug in GTK+, not in Deluge: https://bugzilla.gnome.org/show_bug.cgi?id=684128
Though Deluge devs could try to find and implement a work-around...
From the user perspective, I found out that the following allows me to use the directory I choose: select "Other", choose a directory, then switch to "File System" in the drop-down and switch back to the chosen directory again.
The other option is to downgrade GTK+ to 2.24.10.
comment:35 by , 12 years ago
Cc: | added |
---|
comment:36 by , 12 years ago
It looks like a true 'cause I had some investigation of this bug (in deluge) and I have got the same result.
comment:37 by , 12 years ago
The bug is real trouble for lot of people.see here https://bbs.archlinux.org/viewtopic.php?pid=1173740
comment:40 by , 12 years ago
Component: | gtkui → other |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
I had a feeling from the last debug logs that it was GTK issue and it's strange that I did not see this in F17 when testing previously however updated it and now see the issue along with a temporary workaround:
-
deluge/ui/gtkui/addtorrentdialog.py
diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index a26acf0..f4077c2 100644
a b def __init__(self): 147 147 self.core_config = {} 148 148 149 149 self.glade.get_widget("notebook1").connect("switch-page", self._on_switch_page) 150 self.glade.get_widget("button_location").connect("current-folder-changed", self._on_folder_selected) 151 self.on_folder_selected_path = "" 152 153 def _on_folder_selected(self, widget): 154 log.debug("Selected folder path: %s", widget.get_filename()) 155 self.on_folder_selected_path = widget.get_filename() 150 156 151 157 def start(self): 152 158 self.update_core_config() … … def save_torrent_options(self, row=None): 405 411 406 412 if client.is_localhost(): 407 413 options["download_location"] = \ 408 self.glade.get_widget("button_location").get_filename() 414 self.on_folder_selected_path 415 log.debug("Dl folder: %s", self.glade.get_widget("button_location").get_filename()) 416 log.debug("Dl signal: %s", self.on_folder_selected_path) 409 417 else: 410 418 options["download_location"] = \ 411 419 self.glade.get_widget("entry_download_path").get_text()
comment:42 by , 12 years ago
self.core_config = {} self.builder.get_object("notebook1").connect("switch-page", self._on_switch_page) def start(self): self.update_core_config()
mine did not have
self.glade.get_widget("notebook1").connect("switch-page", self._on_switch_page)
either so do I also add that and remove
self.builder.get_object("notebook1").connect("switch-page", self._on_switch_page)
??
do I change these self.builder to self.glade as well ?
if client.is_localhost(): options["download_location"] = \ self.builder.get_object("button_location").get_filename() else: options["download_location"] = \ self.builder.get_object
using git master afak I would have thought the patch would have already been applied to it ?
comment:43 by , 12 years ago
Since this is a bug in GTK, this hacky workaround will not be applied to our codebase. I am keeping the ticket open to keep track of the upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=684128
If you are using git master then self.builder
is the new object reference so you simply replace in the diff code above self.glade.get_widget
with self.builder.get_object
and it should work.
comment:44 by , 12 years ago
Milestone: | 1.3.6 → not applicable |
---|
I am sorry but I am not sure what you are asking for. You could try wording it differently or maybe supply a screenshot of the issue or proposed solution.