time_since_transfer returning bogus negative values on some seeding torrents

General support for problems installing or using Deluge
Post Reply
Nodle
New User
New User
Posts: 1
Joined: Sat Dec 27, 2025 9:12 am

time_since_transfer returning bogus negative values on some seeding torrents

Post by Nodle »

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
shinger
Seeder
Seeder
Posts: 169
Joined: Sat Jun 05, 2010 1:02 pm

Re: time_since_transfer returning bogus negative values on some seeding torrents

Post by shinger »

Hello Nodle,

Maybe you could post it in the Windows part of the forum. Maybe other users that also use Windows can help you with that.
===============================================================
Server: Rock 5B 8 Cores (ARM), 16 GB RAM, 2 TB 970 Evo +
OS: Linux Ubuntu 24.04 LTS
Deluge: v2.2.0
Plugins: Blocklist, LabelPlus, ItConfig, MyScheduler, Stats, Notifications, YaRSS2
Post Reply