From 10238b46edcb5a8c13008ed0ca5286f2cdbac46d Mon Sep 17 00:00:00 2001 From: David Collom Date: Mon, 12 Nov 2018 20:57:44 +0000 Subject: [PATCH] Resolve issue with long running transmission daemons --- session_stats.go | 14 +++++++------- torrent.go | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/session_stats.go b/session_stats.go index 4b5f7a9..1f2f701 100644 --- a/session_stats.go +++ b/session_stats.go @@ -9,8 +9,8 @@ type ( // SessionStats contains information about the current & cumulative session SessionStats struct { - DownloadSpeed int `json:"downloadSpeed"` - UploadSpeed int `json:"uploadSpeed"` + DownloadSpeed int64 `json:"downloadSpeed"` + UploadSpeed int64 `json:"uploadSpeed"` ActiveTorrentCount int `json:"activeTorrentCount"` PausedTorrentCount int `json:"pausedTorrentCount"` TorrentCount int `json:"torrentCount"` @@ -19,10 +19,10 @@ type ( } // SessionStateStats contains current or cumulative session stats SessionStateStats struct { - DownloadedBytes int `json:"downloadedBytes"` - UploadedBytes int `json:"uploadedBytes"` - FilesAdded int `json:"filesAdded"` - SecondsActive int `json:"secondsActive"` - SessionCount int `json:"sessionCount"` + DownloadedBytes int64 `json:"downloadedBytes"` + UploadedBytes int64 `json:"uploadedBytes"` + FilesAdded int64 `json:"filesAdded"` + SecondsActive int64 `json:"secondsActive"` + SessionCount int64 `json:"sessionCount"` } ) diff --git a/torrent.go b/torrent.go index c3a05e0..7405eb1 100644 --- a/torrent.go +++ b/torrent.go @@ -21,7 +21,7 @@ type ( // TorrentArgumentsAdded specifies the torrent to get added data from TorrentArgumentsAdded struct { HashString string `json:"hashString"` - ID int `json:"id"` + ID int64 `json:"id"` Name string `json:"name"` } @@ -60,16 +60,16 @@ type ( // File is a file contained inside a torrent File struct { - BytesCompleted int `json:"bytesCompleted"` - Length int `json:"length"` + BytesCompleted int64 `json:"bytesCompleted"` + Length int64 `json:"length"` Name string `json:"name"` } // FileStat describe a file's priority & if it's wanted FileStat struct { - BytesCompleted int `json:"bytesCompleted"` - Priority int `json:"priority"` - Wanted bool `json:"wanted"` + BytesCompleted int64 `json:"bytesCompleted"` + Priority int `json:"priority"` + Wanted bool `json:"wanted"` } // TrackerStat has stats about the torrent's tracker