Documentation ¶
Index ¶
- Variables
- func AddInfo(hash, info string) error
- func CloseDB()
- func GetInfo(hash string) string
- func ReadSettings() error
- func RemoveTorrentDB(hash string) error
- func SaveSettings() error
- func SaveTorrentDB(torrent *Torrent) error
- func SetViewed(hash, filename string) error
- func SortFiles(files []File)
- type File
- type Settings
- type Torrent
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Path string
)
View Source
var (
StartTime time.Time
)
Functions ¶
func ReadSettings ¶
func ReadSettings() error
func RemoveTorrentDB ¶
func SaveSettings ¶
func SaveSettings() error
func SaveTorrentDB ¶
Types ¶
type Settings ¶
type Settings struct { CacheSize int64 // in byte, def 200 mb PreloadBufferSize int64 // in byte, buffer for preload RetrackersMode int //0 - don`t add, 1 - add retrackers, 2 - remove retrackers //BT Config DisableTCP bool DisableUTP bool DisableUPNP bool DisableDHT bool DisableUpload bool Encryption int // 0 - Enable, 1 - disable, 2 - force DownloadRateLimit int // in kb, 0 - inf UploadRateLimit int // in kb, 0 - inf ConnectionsLimit int DhtConnectionLimit int // 0 - inf PeersListenPort int }
Click to show internal directories.
Click to hide internal directories.