Skip to content

Commit a08ca6e

Browse files
committed
fix fields that was not being able to be requested
1 parent c9eeadf commit a08ca6e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

session_arguments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type SessionArguments struct {
4848
BlocklistURL *string `json:"blocklist-url"` // location of the blocklist to use for "blocklist-update"
4949
CacheSizeMB *int64 `json:"cache-size-mb"` // maximum size of the disk cache (MB)
5050
ConfigDir *string `json:"config-dir"` // location of transmission's configuration directory
51-
DefaultTrackers []string `json:"-"` // list of default trackers to use on public torrents
51+
DefaultTrackers []string `json:"default-trackers"` // list of default trackers to use on public torrents
5252
DHTEnabled *bool `json:"dht-enabled"` // true means allow dht in public torrents
5353
DownloadDir *string `json:"download-dir"` // default path to download torrents
5454
DownloadQueueEnabled *bool `json:"download-queue-enabled"` // if true, limit how many torrents can be downloaded at once

torrent_accessors.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,21 @@ type torrentGetResults struct {
119119
// Torrent represents all the possible fields of data for a torrent.
120120
// All fields are pointers to detect if the value is nil (field not requested) or real default value.
121121
type Torrent struct {
122-
ActivityDate *time.Time `json:"-"`
123-
AddedDate *time.Time `json:"-"`
122+
ActivityDate *time.Time `json:"activityDate"`
123+
AddedDate *time.Time `json:"addedDate"`
124124
Availability []int64 `json:"availability"` // RPC v17
125125
BandwidthPriority *int64 `json:"bandwidthPriority"`
126126
Comment *string `json:"comment"`
127127
CorruptEver *int64 `json:"corruptEver"`
128128
Creator *string `json:"creator"`
129-
DateCreated *time.Time `json:"-"`
129+
DateCreated *time.Time `json:"dateCreated"`
130130
DesiredAvailable *int64 `json:"desiredAvailable"`
131-
DoneDate *time.Time `json:"-"`
131+
DoneDate *time.Time `json:"doneDate"`
132132
DownloadDir *string `json:"downloadDir"`
133133
DownloadedEver *int64 `json:"downloadedEver"`
134134
DownloadLimit *int64 `json:"downloadLimit"`
135135
DownloadLimited *bool `json:"downloadLimited"`
136-
EditDate *time.Time `json:"-"`
136+
EditDate *time.Time `json:"editDate"`
137137
Error *int64 `json:"error"`
138138
ErrorString *string `json:"errorString"`
139139
ETA *int64 `json:"eta"`
@@ -167,26 +167,26 @@ type Torrent struct {
167167
PercentDone *float64 `json:"percentDone"`
168168
Pieces *string `json:"pieces"`
169169
PieceCount *int64 `json:"pieceCount"`
170-
PieceSize *cunits.Bits `json:"-"`
170+
PieceSize *cunits.Bits `json:"PieceSize"`
171171
Priorities []int64 `json:"priorities"`
172172
PrimaryMimeType *string `json:"primary-mime-type"` // RPC v17
173173
QueuePosition *int64 `json:"queuePosition"`
174174
RateDownload *int64 `json:"rateDownload"` // B/s
175175
RateUpload *int64 `json:"rateUpload"` // B/s
176176
RecheckProgress *float64 `json:"recheckProgress"`
177-
TimeDownloading *time.Duration `json:"-"` // from secondsDownloading
178-
TimeSeeding *time.Duration `json:"-"` // from secondsSeeding
179-
SeedIdleLimit *time.Duration `json:"-"`
177+
TimeDownloading *time.Duration `json:"secondsDownloading"`
178+
TimeSeeding *time.Duration `json:"secondsSeeding"`
179+
SeedIdleLimit *time.Duration `json:"seedIdleLimit"`
180180
SeedIdleMode *int64 `json:"seedIdleMode"`
181181
SeedRatioLimit *float64 `json:"seedRatioLimit"`
182182
SeedRatioMode *SeedRatioMode `json:"seedRatioMode"`
183-
SizeWhenDone *cunits.Bits `json:"-"`
184-
StartDate *time.Time `json:"-"`
183+
SizeWhenDone *cunits.Bits `json:"sizeWhenDone"`
184+
StartDate *time.Time `json:"startDate"`
185185
Status *TorrentStatus `json:"status"`
186186
Trackers []Tracker `json:"trackers"`
187187
TrackerList *string `json:"trackerList"`
188188
TrackerStats []TrackerStats `json:"trackerStats"`
189-
TotalSize *cunits.Bits `json:"-"`
189+
TotalSize *cunits.Bits `json:"totalSize"`
190190
TorrentFile *string `json:"torrentFile"`
191191
UploadedEver *int64 `json:"uploadedEver"`
192192
UploadLimit *int64 `json:"uploadLimit"`

0 commit comments

Comments
 (0)