Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTorrentContent ¶
func GetTorrentContent(torrent string, defaultSite string, forceLocal bool, forceRemote bool, stdin []byte, ignoreParsingError bool) ( content []byte, tinfo *torrentutil.TorrentMeta, siteInstance site.Site, siteName string, filename string, id string, err error)
Read a torrent and return it's contents. torrent could be: local filename (e.g.: abc.torrent), site torrent id (e.g.: mteam.1234) or url (e.g. https://kp.m-team.cc/details.php?id=488424), or "-" to read torrent contents from os.Stdin. forceLocal: force treat torrent as local filename. forceRemote: force treat torrent as site torrent id or url. ignoreParsingError: ignore torrent parsing error, in which case the returned tinfo may by nil. stdin: if not nil, use it as torrent contents when torrent == "-" instead of reading from os.Stdin. siteInstance : if torrent is a site torrent, the created corresponding site instance. sitename & filename & id : if torrent is a site torrent, the downloaded torrent sitename & filename & id.
func ReadArgsFromStdin ¶
Read whitespace splitted tokens from stdin
Types ¶
This section is empty.