Documentation ¶
Index ¶
Constants ¶
View Source
const ( Xunlei = "http://bt.box.n0808.com/%s/%s/%s.torrent" Torcache = "https://torcache.net/torrent/%s.torrent" Itorrent = "http://itorrents.org/torrent/%s.torrent" )
define address
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") LibUrls = []string{ "http://itorrents.org/torrent/%s.torrent", } )
define errors
Functions ¶
This section is empty.
Types ¶
type FileDict ¶
type FileDict struct { Length int64 `json:"length"` Path []string `json:"path"` Md5sum string `json:"md5sum"` }
FileDict into which torrent metafile is parsed and stored into.
type InfoDict ¶
type InfoDict struct { FileDuration []int64 `json:"file-duration"` FileMedia []int64 `json:"file-media"` // Single file Name string `json:"name"` Length int64 `json:"length"` Md5sum string `json:"md5sum"` // Multiple files Files []FileDict `json:"files"` PieceLength int64 `json:"piece length"` Pieces string `json:"-"` Private int64 `json:"-"` }
InfoDict define
type MetaInfo ¶
type MetaInfo struct { Info InfoDict `json:"info"` InfoHash string `json:"info hash"` Announce string `json:"announce"` AnnounceList [][]string `json:"announce-list"` CreationDate int64 `json:"creation date"` Comment string `json:"comment"` CreatedBy string `json:"created by"` Encoding string `json:"encoding"` }
MetaInfo define
func DownloadTorrent ¶
DownloadTorrent
func DownloadXunlei ¶
DownloadXunlei torrent
Click to show internal directories.
Click to hide internal directories.