mirror of
https://github.com/transmission/transmission
synced 2025-02-22 06:00:41 +00:00
update each torrent's stats in the same loop as where we pull the transfer rates (now that the update method doesn't have any other effects)
This commit is contained in:
parent
340a403c69
commit
576a0436f9
1 changed files with 7 additions and 3 deletions
|
@ -919,6 +919,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
[fTorrents addObject: torrent];
|
[fTorrents addObject: torrent];
|
||||||
[torrent release];
|
[torrent release];
|
||||||
|
|
||||||
|
#warning set to bottom of queue
|
||||||
|
|
||||||
[self fullUpdateUI];
|
[self fullUpdateUI];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -988,6 +990,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
[fTorrents addObject: torrent];
|
[fTorrents addObject: torrent];
|
||||||
[torrent release];
|
[torrent release];
|
||||||
|
|
||||||
|
#warning set to bottom of queue
|
||||||
|
|
||||||
[self fullUpdateUI];
|
[self fullUpdateUI];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1665,13 +1669,13 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
|
|
||||||
- (void) updateUI
|
- (void) updateUI
|
||||||
{
|
{
|
||||||
[fTorrents makeObjectsPerformSelector: @selector(update)];
|
|
||||||
|
|
||||||
//pull the upload and download speeds - most consistent by using current stats
|
|
||||||
CGFloat dlRate = 0.0, ulRate = 0.0;
|
CGFloat dlRate = 0.0, ulRate = 0.0;
|
||||||
BOOL completed = NO;
|
BOOL completed = NO;
|
||||||
for (Torrent * torrent in fTorrents)
|
for (Torrent * torrent in fTorrents)
|
||||||
{
|
{
|
||||||
|
[torrent update];
|
||||||
|
|
||||||
|
//pull the upload and download speeds - most consistent by using current stats
|
||||||
dlRate += [torrent downloadRate];
|
dlRate += [torrent downloadRate];
|
||||||
ulRate += [torrent uploadRate];
|
ulRate += [torrent uploadRate];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue