Torrent by magnet. (btih, tr)

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

Torrent by magnet. (btih, tr)

Postby ivan386 » 10 Nov 2009 13:47

This is part of "Download torrent info from seed"
I try to implement this Extension for Peers to Send Metadata Files
ShareazaURL.zip
(7.87 KiB) Downloaded 314 times
Last edited by ivan386 on 12 Nov 2009 21:09, edited 4 times in total.
ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 11 Nov 2009 14:42

what this ?
Shareaza support link in format magnet:?xt=urn:btih:xxxxxxxxxxxxxxxxxxxxxxxxxxxx perfectly.
User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby ivan386 » 11 Nov 2009 15:35

ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby mojo85 » 11 Nov 2009 18:53

I tested the code, and it doesn't seem to work ... it first of all has the Tracker Disabled upon starting the magnet.
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Thanks.

Postby skinvista » 11 Nov 2009 20:31

First of all, thanks for these Ivan, it has been an obvious need for a long time.

I've been running variations on both updates for a couple days, and it almost works.
Clicking relevant URIs now appear to do what they are supposed to, but no resulting download has ever completed.

In the case of the above magnet link, all sources remain "Uninterested" indefinately. No downloading at all.
( @Mojo, if you don't want to set manually just add: m_pTorrent->SetTrackerMode( CBTInfo::tSingle ); )

The other "Download torrent info from seed" thread links seem to work occasionally when adding sources manually, no tracker.

I've also had some instability (crashes) while testing only these updates on a fresh install, but that could be due to my own changes.

This is a great start, but some follow-through will still be needed to see where the problems are.
A lot of potential if we get this right.
Last edited by skinvista on 11 Nov 2009 20:54, edited 1 time in total.
User avatar
skinvista
 
Posts: 74
Joined: 13 Jun 2009 16:34
Location: Boston/NewYorkCity

Re: Torrent by magnet. (btih, tr)

Postby mojo85 » 11 Nov 2009 20:48

Thanks SkinVista ... will try your suggestion.

I too also notice that all BT sources are Uninterested ... haven't even started a download. Another thing is that even BT files with G2 links don't even start, this means that we see it on the download list but it's not quite doing the download action. Definitely needs more refinement, but I too think this is a great addition once it works as it should.
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: Torrent by magnet. (btih, tr)

Postby ivan386 » 12 Nov 2009 03:04

Changed with "Download torrent info from seed"

New bugs :)
ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby raspopov » 12 Nov 2009 18:15

ivan, don't post code silently please. Describe your idea and implementation (here and in other posts).
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Torrent by magnet. (btih, tr)

Postby ivan386 » 12 Nov 2009 22:23

done
ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby ivan386 » 18 Nov 2009 10:21

Last edited by ivan386 on 18 Nov 2009 11:36, edited 1 time in total.
ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 18 Nov 2009 11:31

That HEX BT magnets used on TPB is something new for me. I perfectly used magnets from uTorrent in Shareaza and vice versa. And in other apps also. Don't know why TPB use such magnets (uTorrent convert them to "standard", widely used). But if uTorrent support - Shareaza also must support them.

P.S. Anyone tried TPB magnets in other soft like : Ares or LimeWire/FrostWire ?
User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 18 Nov 2009 11:52

User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby old_death » 18 Nov 2009 12:48

AFAIK from university, this conversion is very easy. Take the HEX based numbers and take always to digits together, add their value and you have the output digit for base32.

http://en.wikipedia.org/wiki/Base32
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Torrent by magnet. (btih, tr)

Postby raspopov » 18 Nov 2009 15:54

Shareaza uses base16 (hex) encoding.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Torrent by magnet. (btih, tr)

Postby ivan386 » 18 Nov 2009 22:29

ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby ocexyz » 19 Nov 2009 02:25

User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: Torrent by magnet. (btih, tr)

Postby raspopov » 19 Nov 2009 05:07

User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Torrent by magnet. (btih, tr)

Postby ocexyz » 19 Nov 2009 08:45

User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: Torrent by magnet. (btih, tr)

Postby ivan386 » 19 Nov 2009 14:47

ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby ocexyz » 19 Nov 2009 19:29

So in general still we are doomed... :mrgreen:
User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: Torrent by magnet. (btih, tr)

Postby old_death » 20 Nov 2009 01:30

I'm just now coding a little C++ app to convert hex <--> base32. This code can be used to simply convert the hashes on magnet reception ;) (but don't press me, I'm still learning C++ and I am doing a lot of mistakes etc.)
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Torrent by magnet. (btih, tr)

Postby raspopov » 20 Nov 2009 05:23

User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Torrent by magnet. (btih, tr)

Postby ivan386 » 20 Nov 2009 07:47

ivan386
 
Posts: 261
Joined: 17 Jun 2009 14:08

Re: Torrent by magnet. (btih, tr)

Postby ailurophobe » 20 Nov 2009 13:48

Sorry to intrude in a conversation I have zero knowledge to offer, but I figured that if I do not understand what you are actually saying, you are probably not understanding each other either and a request for some clarifications would save some time.

@ivan386:
It would have been nice if you had told where that snippet is from. And used English. Translate is cool and all but it still gets some words wrong.

Did I understand this correctly? You go to TPB, click on a magnet link and it doesn't work if the btih is in hex? This would be a bug in the code parsing the magnet, right?

@raspopov:
When you say Shareaza uses hex you mean when it communicates with peers and trackers? Wouldn't the internal presentation be an array of bytes? Which is then converted to whatever character based presentation for display (maybe base32) and network(maybe base16)? (Long time since I looked at this code...)
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Torrent by magnet. (btih, tr)

Postby raspopov » 21 Nov 2009 11:13

I got it!!! :lol: Shareaza uses base16 for BitTorrent GUIDs and base32 for BitTorrent links. Ok, I added full base16 support in r8338.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 21 Nov 2009 13:10

hallelujah
User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 21 Nov 2009 13:25

Now we must add possibility to add .torrent file to any Shareaza download and then rename Shareaza to "Shareaza, the Best Application for Pirate Bay"
User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby ocexyz » 21 Nov 2009 14:52

Last edited by ocexyz on 21 Nov 2009 14:56, edited 1 time in total.
User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: Torrent by magnet. (btih, tr)

Postby ocexyz » 21 Nov 2009 14:54

Last edited by ocexyz on 21 Nov 2009 15:17, edited 1 time in total.
User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: Torrent by magnet. (btih, tr)

Postby old_death » 21 Nov 2009 15:13

User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 21 Nov 2009 15:17

I use magnets with btih only for a long time and Shareaza perfectly downloaded them from G2 and ED2K. Right now i perfectly downloaded torrent wich had only 2 seeds in Shareaza using btih-only magnet link - Shareaza downloaded from 100 ED2K hosts.
User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby ocexyz » 21 Nov 2009 15:32

If Diz confirms this works? I think it should be upgreaded ASAP, problem is in weak Shareaza searching and DHT will be when it will be, so I don't know when. Anyway I want to use TPB again, and hudge number of users also, and now. Even OD y if you are right I vote for official upgreade 2.5.1.0, if now it works, even if works worse. This is what I think.
I suppose this is what Diz has described as few hours of waitng, and the reason of waiting.
User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: Torrent by magnet. (btih, tr)

Postby mojo85 » 22 Nov 2009 10:18

I also want to move this along as well. Now ivan386 correct me if I'm mistaken; what your implementation does is:

ShareazaUrl --> Handles Magnet Url's with (BTIH and Tracker and Filename), it also treats such a Url as a torrent file would be ... not how the current Magnet's with BTIH's are only recognized as a HTTP based download.

DownloadInfoFromSeed --> Implements the BT extended protocol of getting file information (file size, and type/ content), and filename from seeds obtained through a tracker or through network meshing. This action also creates a torrent file in the Torrent folder.

I have been playing around with this for several days now. It is pretty good and should be added immediately. One quirk that I noticed is that some Torrent sites don't add the file extension to the filename (incase it is a folder). Now upon downloading ShareazaURL obtains the name as that without an extension, and it doesn't get updated by obtaining the metadata from a seeder. Best practice is to always obtain the filename from another seeder and disregard the filename in the magnet url. For an example try the magnets from EZTV , they update perfectly once the filename is removed manually from the magnet url.
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: Torrent by magnet. (btih, tr)

Postby mojo85 » 26 Nov 2009 08:28

Bump

I wanted to bring this back up as I still have a suggestion with regards to the implementation of this code. Now as the post above already stated that at times the file extension won't be found in the filename on the magnets 'dn=' tag. As proof can be seen on EZTV, amongst the biggest TV torrent site.

EZTV

What I find to work is that when I manually remove the filename tag from the magnet, and Shareaza finds the correct one from the network. Currently a file with no extension is downloaded, and this can be an issue to people not too familiar with P2P.

So again I suggest we don't parse filenames from Magnets with tracker and btih content in it, lets leave that for the network to find. Is my point understood?
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 26 Nov 2009 10:06

User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby mojo85 » 26 Nov 2009 19:48

What it means is that prior to revision 8342, a Magnet with a BTIH wouldn't have the Properties window meant for BT downloads. It would only have the properties window meant for G2 based downloads.
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: Torrent by magnet. (btih, tr)

Postby diztrancer » 27 Nov 2009 12:02

Magnet with BTIH only is not torrent-download, this is standard download like any other magnet without "tr" - tracker.
Only magnets with "tr" have BitTorrent properties.
User avatar
diztrancer
 
Posts: 222
Joined: 13 Jun 2009 15:41
Location: Ukraine

Re: Torrent by magnet. (btih, tr)

Postby ailurophobe » 27 Nov 2009 13:15

btw, bittorrent search engines seem to support searching by btih and returning trackers and tracker stats (and .torrent). Does anyone know if any of these are stable (API, server, and not banning us) and reliable enough to be worth having Shareaza query them as a last resort if only btih is known?
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Torrent by magnet. (btih, tr)

Postby mojo85 » 27 Nov 2009 19:43

mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: Torrent by magnet. (btih, tr)

Postby mojo85 » 28 Nov 2009 07:04

mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Next

Return to Code Submission

Who is online

Users browsing this forum: No registered users and 1 guest

cron