qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Last Activity counter getting reset when qbittorrent is restarted

Open Yoshi900 opened this issue 7 years ago • 22 comments

Please provide the following information

qBittorrent version and Operating System

4.0.0 windows 10

What is the problem

When qbittorrent application is restarted the "Last Activity" counter also restarts (goes back to 0 minutes)

What is the expected behavior

Last Activity to know when the last activity of the torrent had been even after application exit (did work before 4.0.0)

Steps to reproduce

Add the "Last Activity" column Have a torrent idle for a number of minutes.
Fully exit Qbittorrent (exit from tray) Start qbittorrent and notice that the "Last Activity" counter is at 0 minutes for all torrents before exit after exit


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Yoshi900 avatar Nov 20 '17 23:11 Yoshi900

Nothing we can do. Those are per session data.

sledgehammer999 avatar Nov 22 '17 02:11 sledgehammer999

(did work before 4.0.0)

Are you sure?

sledgehammer999 avatar Nov 22 '17 02:11 sledgehammer999

Yeah totally worked. I always used it to use it to keep torrents alive until "Last Activity" was 30 days +

Yoshi900 avatar Nov 22 '17 03:11 Yoshi900

@Yoshi900 Those torrents in the images are seeding, right?

Chocobo1 avatar Nov 22 '17 04:11 Chocobo1

The calculation was changed in #7480. Before the change the code was incorrect, because it didn't took account of last upload/download activity time could contain an invalid value. Also "Last Activity" is defined as: the last time which upload data or download data occurred.

Chocobo1 avatar Nov 22 '17 04:11 Chocobo1

Yeah that would be fine if it was upload or download data occurred which would set the "Last Activity" time to 0 But if exit qbittorrent it resets the "Last Activity" time to 0 which before v4 it would keep the time on restart of the application.

Before application restart image

after application restart (edit had to blur out categories) image

As you can see from the second screenshot all the "Last Activity" is 2m ago (from the application restart) but only one of the torrents has transferred data which is up the top and is < 1m ago.

So it is not keeping the state as it was before the application exit.

Yoshi900 avatar Nov 22 '17 05:11 Yoshi900

Same here

greenbench avatar Nov 25 '17 01:11 greenbench

Yeah I can confirm with Greenbench that the data from "Last Activity" is not correct. I am now getting incorrect data for new torrents which have traffic being transferred.

Highlighted are incorrect. the only one that seems to be correct is the non highlighted one however I cannot say this is 100% correct.

image

Yoshi900 avatar Nov 27 '17 00:11 Yoshi900

The column definitely seems broken. In previous versions (3.x) it always at least seemed to make logical sense to me... I could use the "Last Activity" column to sort currently active (uploading/downloading) torrents to the top. Now, it seems like actual activity doesn't really reset the counter at all. In fact, most of the torrents tend to to be within +/- an hour of each other (roughly when I started the program), and increases as time goes on.

So what ends up happening is, sorting this column maybe indicates the first time (that session) that the torrent connected to the tracker... any download or upload activity doesn't reset this, so using this column for anything meaningful is impossible.

Previously, the time WAS updated with new upload/download activity, and the time WAS saved between restarts. I definitely saw times ranging from now to >200 days ago... and they were all "Seeding" status.

MasterEvilAce avatar Dec 07 '17 17:12 MasterEvilAce

Confirming also affected by this issue with Last Activity:

  • resets on program start - in 3.x versions was retained between restarts
  • shows incorrectly - eg. torrents with no traffic this session may appear as (time since program started) or infinity - eg active torrents (ie. receiving data) showing as hours since Last Activity

10drils avatar Dec 13 '17 01:12 10drils

Chiming in to say I also noticed and am saddened by this change in v4.0 to reset the Last Activity column to zero between program starts. The 3.x way of doing things was much nicer - sorry to be a complainer but I use the Last Activity column sort exclusively!

TokenRing avatar Dec 22 '17 22:12 TokenRing

Same problem on 4.0.4, I dislike the way it is now, it is more or less useless now :(

Fixer-007 avatar Feb 28 '18 17:02 Fixer-007

Was this a conscious choice by qbt's developers to make the "last activity" for each torrent the infinity loop every time we wake our machines up from sleep? If so...I can't fathom why. But if this was an intentional decision, I wish they would give us back the option to have the time count up normally.

TokenRing avatar Mar 01 '18 14:03 TokenRing

Should be fixed in v4.1.0.

Chocobo1 avatar May 11 '18 16:05 Chocobo1

I had the added date getting reset sometimes, for unfinished downloads. Not sure why.

mzso avatar May 12 '18 00:05 mzso

Don't think it is fixed on windows 7 qbt 4.1.0, most fields are empty, only few hours recent activity is shown. Can someone recheck?

Fixer-007 avatar May 12 '18 14:05 Fixer-007

@Fixer-007 4.1.0 has to start counting all torrents from the beginning because it wasn't saving them before.

thalieht avatar May 12 '18 17:05 thalieht

Issue is not fixed for me, counter still starts from the time PC was started pretty much on some active torrents, most entries are empty though.

Fixer-007 avatar May 13 '18 17:05 Fixer-007

Not fixed for me, I'm on Win 7 x64.

greenbench avatar Jun 09 '18 09:06 greenbench

There is still a similar problem with version 4.2.0. Some days ago

  • some dates were reset to zero, I guess, so many of them has the same "Last activity",
  • and some went to Infinity, even if I know that there was upload recently for that file. I haven't realized any problem earlier.

horvatha avatar Dec 13 '19 10:12 horvatha

Still a problem on 4.3.0

Fixer-007 avatar Oct 20 '20 16:10 Fixer-007

Still an issue on Win11 4.4.3.1

Seewhyseeoh avatar Jul 10 '22 11:07 Seewhyseeoh

I just noticed this issue is still present in v4.4.5 only showing activity for the last 12hrs from restart and infinity on everything else.

But I checked on the WebUI and it shows the activity correctly.

Hopefully that info will lead to a solution. At the very least it's a workaround for those who purge torrents after a period of inactivity.

slydog3333 avatar Feb 11 '23 18:02 slydog3333

@slydog3333 is this still present for 4.6.0 ?

luzpaz avatar Nov 14 '23 20:11 luzpaz

@luzpaz So I updated to 4.6 last night and I think it might be working now. I'm at 22hrs and that data survived a restart.

A couple weird things though. It seems all previous data was wiped. Most of my torrents still show infinity as they haven't had activity yet but there's also a bunch that show 53yrs. Then on WebUI nothing shows infinity but most show 53yrs and a bunch show 1y 143 days and then also some random 30-87 days. So WebUI isn't matching up with the client for the no activity yet torrents but all the recent activity matches up.

So hopefully those are just weird glitches and overall probably should be working right going forward.

Thanks for the fix.

slydog3333 avatar Nov 16 '23 00:11 slydog3333