Bug 271521 - Time since torrent has started is added to Time Downloaded every pause/resume
Summary: Time since torrent has started is added to Time Downloaded every pause/resume
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-22 23:26 UTC by Vita Cizek
Modified: 2011-06-11 11:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vita Cizek 2011-04-22 23:26:58 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

When a running torrent is paused and resumed, a time is added to Time Downloaded (runtime_dl). The amount of added time is equal to the torrent's actual running time.

Reproducible: Always

Steps to Reproduce:
Start downloading some torrent.
Pause.
Resume.


Actual Results:  
Time since the torrent was started is added to Time Downloaded.

Expected Results:  
Time Downloaded should't leap forward.

Arch Linux package Ktorrent 4.1.0-1, 64 bit.

The time seems to be added in function TorrentControl::getRunningTimeDL(), on line 1186 of torrentcontrol.cpp:

return istats.running_time_dl + istats.time_started_dl.secsTo(QDateTime::currentDateTime());

http://api.kde.org/4.4-api/kdenetwork-apidocs/kget/html/torrentcontrol_8cpp_source.html#l01186

(Note, this is 4.4 api)
Comment 1 Joris Guisson 2011-04-23 19:17:59 UTC
Git commit e0e26883dbf47667f4a5738ca8762118ad51206a by Joris Guisson.
Committed on 23/04/2011 at 19:26.
Pushed by guisson into branch 'master'.

Fix bug causing running time to be wrong when pausing torrents

BUG: 271521

M  +1    -0    ChangeLog     
M  +13   -5    src/torrent/torrentcontrol.cpp     
M  +1    -0    src/torrent/torrentcontrol.h     

http://commits.kde.org/libktorrent/e0e26883dbf47667f4a5738ca8762118ad51206a
Comment 2 Joris Guisson 2011-04-23 19:19:08 UTC
Git commit 13fc4d99296e3869c23c0ddef055ecb0a0e3d66e by Joris Guisson.
Committed on 23/04/2011 at 19:26.
Pushed by guisson into branch '1.1'.

Backport to 1.1: Fix bug causing running time to be wrong when pausing torrents

CCBUG: 271521

M  +1    -0    ChangeLog     
M  +13   -5    src/torrent/torrentcontrol.cpp     
M  +1    -0    src/torrent/torrentcontrol.h     

http://commits.kde.org/libktorrent/13fc4d99296e3869c23c0ddef055ecb0a0e3d66e
Comment 3 Joris Guisson 2011-06-11 11:56:46 UTC
*** Bug 275380 has been marked as a duplicate of this bug. ***