Magnet links contain less info than .torrent files, so we need to decouple the info we would normally get from a file:
[ ] Metadata should now only contain fields used to acquire peer info, and possibly additional info about the torrent itself (maybe rename to TrackerInfo)
[ ] Get rid of TrackerInfo, just store the list of PeerInfo directly. (TrackerHandler maybe?)
[x] Info becomes FileInfo, FileInfo becomes FilePathInfo or DirectoryInfo
This now gives us the following process:
+---------------------------+
| If from file, we already |
| have FileInfo, so just | ----------------¬
| req PeerInfo from tracker | \
+---------------------------+ \
/ \
+---------------------------+ / \ +-----------------+
| Parse TrackerInfo | | Start peer wire |
| from file/magnet link | / | protocol |
+---------------------------+ \ / +-----------------+
\ /
+----------------------+ +---------------+
| If from magnet, get | -----> | Get PeerInfo |
| FileInfo using DHT | | from DHT |
+----------------------+ +---------------+
Magnet links contain less info than .torrent files, so we need to decouple the info we would normally get from a file:
This now gives us the following process:
http://www.bittorrent.org/beps/bep_0005.html