mirror of
https://github.com/zoriya/flood.git
synced 2025-12-06 07:16:18 +00:00
fix: changed transmission ratio calculation to total size instead of downloaded size (#791)
This commit is contained in:
@@ -383,7 +383,10 @@ class TransmissionClientGatewayService extends ClientGatewayService {
|
|||||||
...(await Promise.all(
|
...(await Promise.all(
|
||||||
torrents.map(async (torrent) => {
|
torrents.map(async (torrent) => {
|
||||||
const percentComplete = (torrent.haveValid / torrent.totalSize) * 100;
|
const percentComplete = (torrent.haveValid / torrent.totalSize) * 100;
|
||||||
const ratio = torrent.downloadedEver === 0 ? -1 : torrent.uploadedEver / torrent.downloadedEver;
|
const ratio =
|
||||||
|
torrent.downloadedEver === 0
|
||||||
|
? torrent.uploadedEver / torrent.totalSize
|
||||||
|
: torrent.uploadedEver / torrent.downloadedEver;
|
||||||
const trackerURIs = getDomainsFromURLs(torrent.trackers.map((tracker) => tracker.announce));
|
const trackerURIs = getDomainsFromURLs(torrent.trackers.map((tracker) => tracker.announce));
|
||||||
const status = torrentPropertiesUtil.getTorrentStatus(torrent);
|
const status = torrentPropertiesUtil.getTorrentStatus(torrent);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user