Commit Graph

76 Commits

Author SHA1 Message Date
Matt Joiner b97b50aca9 New storage interface 2016-03-28 20:38:30 +11:00
Matt Joiner a04fb2ce26 metainfo: Check for error unmarshalling bad nodes contents from a metainfo 2016-02-23 23:53:39 +11:00
Matt Joiner 9c7d3d4783 metainfo: Fix use of CastSlice when copying nodes 2016-02-23 22:47:41 +11:00
Matt Joiner d67379b3cb metainfo: Ensure that nodes encode correctly 2016-02-23 22:37:38 +11:00
Matt Joiner 752e884155 metainfo: Support nodes as []string or [](string, int64)
Fixes #65.
2016-02-23 22:28:23 +11:00
Matt Joiner b3a5591d14 metainfo: It looks like the "nodes" field of metainfo was never handled correctly, support []string instead of [][]string, fix tests 2016-02-23 22:04:06 +11:00
Matt Joiner 7ed81fa708 metainfo tests: Fix some naming conventions 2016-02-23 21:50:07 +11:00
Matt Joiner 95aa411699 missinggo.ZeroReader is now a var, not a type 2016-02-05 01:20:02 +11:00
Matt Joiner 0e85ff190d go vet 2016-02-02 00:44:29 +11:00
Matt Joiner f9c600b264 metainfo: Add alternative "builder" API
The existing builder API is gross and heavy-handed. I won't rip it out just yet.
2015-10-30 01:21:09 +11:00
Matt Joiner 5372375bd5 Fix #35 2015-10-29 23:47:13 +11:00
Matt Joiner 1a4fbed1ac Make Piece a concrete type
There was a lot of allocations occuring because it was an interface.
2015-10-19 01:31:34 +11:00
Milos Gajdos dfd654bcde Adding trackerless.torrent metainfo file to test suite 2015-05-03 16:37:48 +01:00
Milos Gajdos f6d1652360 Added support for trackerless metainfo files
Based on the official spec
(http://www.bittorrent.org/beps/bep_0005.html) trackerless metainfo
files do not contain announce key. Instead nodes key has to be
specified. This PR adds support for nodes key into metainfo package. It
also contains a test metainfo file.
2015-05-03 11:30:27 +01:00
Matt Joiner c5208569ca Apply sortimports 2015-04-30 00:31:34 +10:00
Matt Joiner 526d9d738e Rewrite imports to local bencode and metainfo 2015-04-27 14:55:01 +10:00
Matt Joiner ceabaaaeb2 Add Piece.Offset 2015-03-04 13:03:47 +11:00
Matt Joiner b4d3b0d11a Add Piece.Hash() 2015-02-27 13:00:05 +11:00
Matt Joiner daf93c8232 Add various helpers to Info 2015-02-27 01:41:35 +11:00
Matt Joiner a5d60fd76f Fixes for single/multi-file torrent Infos 2015-02-26 22:12:02 +11:00
Matt Joiner 5a3a110e99 Add UpvertedFiles() to Info to make single-file torrents usable like
multi-file torrents.
2015-01-28 01:26:18 +11:00
Matt Joiner 543d0e72a9 Use the same info bytes from a decode, for a recode
This handles strange uses of optional info fields, like private=0
2014-12-01 23:28:22 -06:00
Matt Joiner 256d2e6530 Ensure that encoded and decoded forms match 2014-12-01 23:27:17 -06:00
Matt Joiner e68810f29c Need to break from the parent soon... 2014-11-28 10:34:19 -06:00
Matt Joiner 9d72fd024e Expose MetaData directly so it can be bencoded from external packages 2014-07-13 17:36:06 +10:00
Matt Joiner a44d2d88c3 Rename torrent package to metainfo; expose MetaInfo["info"] so it can be used on its own
--HG--
rename : torrent/README => metainfo/README
rename : torrent/_testdata/archlinux-2011.08.19-netinstall-i686.iso.torrent => metainfo/_testdata/archlinux-2011.08.19-netinstall-i686.iso.torrent
rename : torrent/_testdata/continuum.torrent => metainfo/_testdata/continuum.torrent
rename : torrent/builder.go => metainfo/builder.go
rename : torrent/metainfo.go => metainfo/metainfo.go
rename : torrent/metainfo_test.go => metainfo/metainfo_test.go
2014-06-28 19:40:39 +10:00