Opened 10 years ago

Closed 7 years ago

#4712 closed Bug (fixed)

Adding magnet link opens torrent preferences even if 'display a window' is disabled

Reported by: pike Owned by: livings124
Priority: Normal Milestone: 2.83
Component: Mac Client Version: 2.42
Severity: Normal Keywords: magnet link default directory

Description (last modified by livings124)

Using the Mac OS X version, transmission opens the preferences, followed by a choose directory dialog whenever I add a magnet link. I discovered this is due to the way my default download directory is set "Same as Torrent file". When I change it to ~/Downloads this problem goes away. I actually looked at the source code to troubleshoot this, I found this in macosx/Controller.m:

 if ([fDefaults boolForKey: @"MagnetOpenAsk"] || !location)
        AddMagnetWindowController * addController = 

Apparently location == nil when the default download directory is set this way. Since a magnet link does not have a torrent and therefore no directory to download to in this logic, this behavior is logical, but only to a programmer who has looked at the code :-). I would suggest a reasonable default for location in this case, like ~/Downloads, if it exists.

Change History (14)

comment:1 Changed 10 years ago by livings124

  • Description modified (diff)

comment:2 follow-up: Changed 10 years ago by livings124

This would involve setting a separate download directory option for magnet links, or hardcoding in a location for magnet links when it's set to "Same as Torrent File." I don't believe either options are any better.

comment:3 in reply to: ↑ 2 Changed 10 years ago by pike

Replying to livings124: Can't you just grey out the 'Display a window when adding a magnet link' option, whenever 'Same directory as torrent' is selected? (preferably with a tool-tip, or something else to indicate the reason). This irritated me enough to go look at the source code, and without it I would never have found the cause. Maybe I am the only one in the world with that option enabled, but I doubt it, and piratebay just switched to make magnet links the default :-).

comment:4 Changed 10 years ago by livings124

That is a pretty good idea actually.

comment:5 Changed 9 years ago by livings124

  • Milestone changed from None Set to Sometime

comment:6 Changed 9 years ago by livings124

  • Milestone changed from Sometime to 2.90
  • Status changed from new to assigned

comment:7 Changed 8 years ago by livings124

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:8 Changed 8 years ago by livings124

  • Milestone changed from 2.90 to 2.83

comment:9 Changed 7 years ago by dihard

Screenshot of settings and magnet add window still persisting:

I've tested with the latest build, Transmission-14493.dmg, and the current stable 2.84 (14306). Mac Yosemite 10.10.2 and just upgraded to 10.10.3 no change.

comment:10 Changed 7 years ago by dihard

My first comment didn't seem to go through, here's more info:

I have "Display a window when opening a magnet link" unchecked in preferences but the Add dialog window still comes up. I have rebooted after unchecking. I did a search and made sure "Same as torrent file" for download location was not selected which was the proposed solution above but it did nothing. I have Transmission running on two macs and done all of the above and both display the Add window when adding a magnet.

What else can I do/check to solve this or get the information you need?

comment:11 Changed 7 years ago by dihard

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ok, I've tried a few more things.

This is the value in my org.m0k.transmission.plist file I think is related to this setting:

NSWINDOW Frame AddMagnetWindow? : <string>645 375 510 260 0 0 1440 877 </string>

I tried deleting the plist file so it would create a fresh one and reset my preferences but the file keeps coming back. I'm not sure how to do a reset.

After this I tried a friend's mac that has never had Transmission installed and that one works correctly. I looked at his plist file and it looks very different than mine, about 1/4 the number of fields. It doesn't have this Addmagnetwindow field but instead has a MagnetOpenAsk?/boolean/NO field that mine doesn't have. I tried adding this field to mine as well as replacing my plist file with his but it keeps getting overwritten when I launch Transmission.

I know something is off here but I'm not sure exactly what this means but hopefully that gives you enough to figure out what's going on?

comment:12 Changed 7 years ago by dihard

I've also tried deleting both the plist file and the whole with a fresh copy off the site at the same time but it still loads the old preferences.

comment:13 Changed 7 years ago by x190

This is a forum issue being dealt with here.

comment:14 Changed 7 years ago by x190

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.