y500 / libtorrent

Automatically exported from code.google.com/p/libtorrent
0 stars 0 forks source link

total_payload_download / total_payload_upload become 0 after pause-resume in the same session #742

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am using the currently latest code of RC_0_16 and RC_1_0 on Windows 7 64bit.

Those stats are zeroed each time a paused torrent is resumed in the same 
session. On qBittorrent those stats are used for the "Session Download" and 
"Session Upload" columns of the treeview.
Users expect a session to mean "the time I start the application till the time 
I exit the application".

The docs just say "counts the amount of bytes send and received this session". 
Is this a bug or a documentation issue?

IMO, as long as the libtorrent::session isn't destroyed (and the torrent isn't 
deleted from the session) those shouldn't be reset.

Original issue reported on code.google.com by hammered...@gmail.com on 11 May 2015 at 4:36

GoogleCodeExporter commented 8 years ago
the comments in the code suggests that this was done deliberately because of 
trackers expecting stats to reset when stopping and starting again. There 
should be a way to still have the semantics you describe though.

Original comment by arvid.no...@gmail.com on 12 May 2015 at 12:21

GoogleCodeExporter commented 8 years ago
after looking at this a bit more, I'm inclined to just fix the documentation. 
It seems like you could use all_time_upload and all_time_download instead. They 
are saved in the resume data though.

Original comment by arvid.no...@gmail.com on 12 May 2015 at 12:49

GoogleCodeExporter commented 8 years ago
I already use for other columns. Those aren't session based but "all time".

Original comment by hammered...@gmail.com on 12 May 2015 at 12:51

GoogleCodeExporter commented 8 years ago
Btw, total_download/total_upload seem to have the correct documentation about 
pause-start...

Original comment by hammered...@gmail.com on 12 May 2015 at 12:53

GoogleCodeExporter commented 8 years ago
I updated the documentation.

Original comment by arvid.no...@gmail.com on 12 May 2015 at 3:45