-
Notifications
You must be signed in to change notification settings - Fork 5
/
templates.go
101 lines (96 loc) · 2.76 KB
/
templates.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package transmission
type JsonMap map[string]interface{}
var SessionGetBase = JsonMap{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"blocklist-enabled": false,
"blocklist-size": 393006,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"config-dir": "/var/lib/transmission-daemon",
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"rename-partial-files": true,
"rpc-version": 15,
"rpc-version-minimum": 1,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"start-added-torrents": true,
"trash-original-torrent-files": false,
"units": map[string]interface{}{
"memory-bytes": 1024,
"memory-units": []string{
"KiB",
"MiB",
"GiB",
"TiB",
},
"size-bytes": 1000,
"size-units": []string{
"kB",
"MB",
"GB",
"TB",
},
"speed-bytes": 1000,
"speed-units": []string{
"kB/s",
"MB/s",
"GB/s",
"TB/s",
},
},
"version": "2.84 (14307)",
}
var TorrentGetBase = JsonMap{
"errorString": "",
"metadataPercentComplete": 1,
"isFinished": false,
"queuePosition": 0, // Looks like not supported by qBittorent
"seedRatioLimit": 2,
"seedRatioMode": 0, // No local limits in qBittorrent
"activityDate": 1443977197,
"secondsDownloading": 500,
"secondsSeeding": 80000,
"isPrivate": false, // Not exposed by qBittorrent
"honorsSessionLimits": true,
"webseedsSendingToUs": 0,
"bandwidthPriority": 0,
"seedIdleLimit": 10,
"seedIdleMode": 0, // TR_IDLELIMIT_GLOBAL
"manualAnnounceTime": 0,
"etaIdle": 0,
"torrentFile": "",
"webseeds": []string{},
"peers": []string{},
"magnetLink": "",
}
var TrackerStatsTemplate = JsonMap{
"announceState": 0,
"hasScraped": false,
"isBackup": false,
"lastAnnounceStartTime": 0,
"lastAnnounceTime": 0,
"lastAnnounceTimedOut": false,
"lastScrapeResult": "",
"lastScrapeStartTime": 0,
"lastScrapeSucceeded": false,
"lastScrapeTime": 0,
"lastScrapeTimedOut": 0,
"nextAnnounceTime": 0,
"nextScrapeTime": 0,
"scrapeState": 2,
}
var SessionStatsTemplate = JsonMap{
"current-stats": map[string]int64{
"filesAdded": 13,
"sessionCount": 1,
},
}