Jump to content

Magnet Links


biduin

Recommended Posts

Hello everyone!

Can you please help me?

1) How can I create magnet URI from existing (uploaded) torrent file?

2) How can I start downloading if I have Magnet URI but do not have *.torrent file?

I do know how to perform each of this actions in Win version of uT. But using Mac.... unfortunately.

Thank you in advance.

Link to comment
Share on other sites

  • 2 months later...

Magnet URIs basically tell clients to get the main part of the .torrent file (the info dictionary) from another peer over DHT. It's not necessarily better or worse -- it's just a different transferring model (no centralized location for getting the metainfo). It can take a bit longer to get the metainfo (as in the necessary part of the .torrent file) over DHT than it would take to get the .torrent file directly from some HTTP server, but that's the price you'll have for having decentralized, peer-to-peer .torrent file sharing.

After µTorrent gets the metainfo file over DHT, it behaves no differently than a regular .torrent file.

The only real user-facing issue currently with µTorrent's handling of magnet URIs (for the Windows version anyway -- I'm not sure how µTorrent Mac handles it) is that it doesn't actually ask the user where he/she wishes to save the torrent contents to on the drive -- it uses the default download location set in the preferences. The reason it doesn't ask immediately once the magnet URI is added is because µTorrent doesn't actually know anything about the torrent contents (name, size, or files) until it gets the metainfo, and (as mentioned above) the metainfo can take a bit of time to get. As such, if the user adds a magnet URI, steps away, and forgets that he/she needs to select a download directory once the metainfo file is actually received, the torrent would never proceed downloading until the user gets back, which may not be what the user expects.

Link to comment
Share on other sites

As such, if the user adds a magnet URI, steps away, and forgets that he/she needs to select a download directory once the metainfo file is actually received, the torrent would never proceed downloading until the user gets back, which may not be what the user expects.

That would be exactly what I expect, retrieve the meta info, then ask me where to save the files.

Perhaps an option to allow/disallow the save dialog with default set to off would do the trick. Or instead of saying "Downloading" how about making it say "Retrieving Meta Info" for the download's status.

As is, it makes me feel like I'm using eMule or something, not uTorrent. I remember when uTorrent came out with the feature to select or de-select files in a torrent. That was a huge plus that made a lot of people start using it & now it kind of feels like the feature is fading away. I know I can use the files tab to choose which files to download & skip, but this is much more cumbersome, and has done nothing but confuse other users I know...

Link to comment
Share on other sites

No one said anything about the dialog going away, or that the behavior wouldn't be changed. I'd already discussed this issue with the devs from very early on when magnet URI support was first implemented -- there was simply not much impetus to come up with a better solution at the time, so it was just left as is.

Link to comment
Share on other sites

Ultima wrote:

if the user adds a magnet URI, steps away, and forgets that he/she needs to select a download directory once the metainfo file is actually received, the torrent would never proceed downloading until the user gets back, which may not be what the user expects.

That's just what we would need! It's a real mess to have to store all files in one folder!

Link to comment
Share on other sites

the people are saying they have problems on MAC you damn retards , not windows , utorrent for mac has no magnet URI association preference or whatnot

utorrent.png

utorrent developers stop slacking and add the magnet url handler for OSX , ill even tell you how to do it http://stackoverflow.com/questions/49510/how-do-you-set-your-cocoa-application-as-the-default-web-browser

1) Add the URL schemes your app can handle to your application's info.plist file

To add support for magnet: you'd need to add the following to your application's info.plist file. This tells the OS that your application is capable of handling MAGNET URLs.

<key>CFBundleURLTypes</key>

<array>

<dict>

<key>CFBundleURLName</key>

<string>magnet URL</string>

<key>CFBundleURLSchemes</key>

<array>

<string>magnet</string>

</array>

</dict>

</array>

2) Write an URL handler method

This method will be called by the OS when it wants to use your application to open a URL. It doesn't matter which object you add this method to, that'll be explicitly passed to the Event Manager in the next step. The URL handler method should look something like this:

- (void)getUrl:(NSAppleEventDescriptor *)event

withReplyEvent:(NSAppleEventDescriptor *)replyEvent

{

// Get the URL

NSString *urlStr = [[event paramDescriptorForKeyword:keyDirectObject]

stringValue];

//TODO: Your custom URL handling code here

}

3) Register the URL handler method

Next, tell the event manager which object and method to call when it wants to use your app to load an URL. In the code here I'm passed self as the event handler, assuming that we're calling setEventHandler from the same object that defines the getUrl:withReplyEvent: method.

You should add this code somewhere in your application's initialisation code.

NSAppleEventManager *em = [NSAppleEventManager sharedAppleEventManager];

[em

setEventHandler:self

andSelector:@selector(getUrl:withReplyEvent:)

forEventClass:kInternetEventClass

andEventID:kAEGetURL];

Some applications, including early versions of Adobe AIR, use the alternative WWW!/OURL AppleEvent to request that an application opens URLs, so to be compatible with those applications you should also add the following:

[em

setEventHandler:self

andSelector:@selector(getUrl:withReplyEvent:)

forEventClass:'WWW!'

andEventID:'OURL'];

4) Set your app as the default browser

Everything we've done so far as told the OS that your application is a browser, now we need to make it the default browser.

We've got to use the Launch Services API to do this. In this case we're setting our app to be the default role handler for HTTP and HTTPS links:

NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier];

OSStatus httpResult = LSSetDefaultHandlerForURLScheme((CFStringRef)@"http", (CFStringRef)bundleID);

OSStatus httpsResult = LSSetDefaultHandlerForURLScheme((CFStringRef)@"https", (CFStringRef)bundleID);

//TODO: Check httpResult and httpsResult for errors

(It's probably best to ask the user's permission before changing their default browser.)

Custom URL schemes

It's worth noting that you can also use these same steps to handle your own custom URL schemes. If you're creating a custom URL scheme it's a good idea to base it on your app's bundle identifier to avoid clashes with other apps. So if your bundle ID is com.example.MyApp you should consider using x-com-example-myapp:// URLs.

Link to comment
Share on other sites

@mancini: While we all appreciate you being able to paste random, irrelevant sample code from stackoverflow, its really not needed. Plus, its an absolutely horrible idea for µTorrent to try and be the main web browser for the system. As the sample code you found from google would do.

@luhmann: Features take a lot of time to develop. µTorrent for windows has been around for *years*. µTorrent for mac? not nearly as long.

@amau96: When its ready? We don't do ETA's.

Link to comment
Share on other sites

  • 2 years later...
  • 3 weeks later...

Final answer for Mac (magnet links on uTorrent)

Latest version of uTorrent on Mac can now accept magnet links such as torrents in TPB.

Why you can't see the files you are going to download?

Just select a location and it will download all things in the torrent.

I know, you see something blank, just trust me and press download.

You never know if you didn't try.

You guys should read this 2 years ago, but you didn't

As such, if the user adds a magnet URI, steps away, and forgets that he/she needs to select a download directory once the metainfo file is actually received, the torrent would never proceed downloading until the user gets back, which may not be what the user expects.

After µTorrent gets the metainfo file over DHT, it behaves no differently than a regular .torrent file.

It's your mistake that made you can't download magnet torrents.

Please DO NOT bump this post anymore and make further confuses.

Thank you.

Link to comment
Share on other sites

  • 3 weeks later...

Oh ya, good job adding the magnet association to Mac.

Now how do I remove it?

I don't want the association, as I still want to download .torrent files.

Only, there's no way to choose whether uTorrent installs the association.

And there's no way to delete the association.

Even if you scrub uTorrent from your system, the association remains.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...