Hi, I'm writing a script that uses the Deluge JSON-RPC API to check torrent activity before removing completed torrents. I wanted to use time_since_transfer to avoid removing torrents that are still actively uploading to peers. I noticed in the WebUI that a torrent actively uploading was showing infinity in the Last Transfer column, which prompted me to check the actual API values. I found bogus data being returned:
Code: Select all
time_since_upload: 743
time_since_download: -139498
time_since_transfer: -139498
The upload value looks correct (~12 minutes), but time_since_download is returning a large negative number, and that value is being used for time_since_transfer. I found an older thread discussing how time_since_transfer is calculated:
viewtopic.php?t=41999 and somewhere else that it picks the lowest value which in this case and others that I am seeding will likely be incorrectly picking the large negative number.
My workaround is to use time_since_upload directly for seeding torrents, which works fine. But wanted to report this in case it's a known issue or worth investigating.
Versions:
Deluge: 2.2.0
libtorrent: 1.2.19.0
Windows Server 2025