mirror of
https://github.com/transmission/transmission
synced 2025-03-12 07:03:44 +00:00
hopefully a bit better...now just figure out a way to get the progress before starting a torrent
This commit is contained in:
parent
ae064b1ba7
commit
f6b456b7c3
1 changed files with 2 additions and 1 deletions
|
@ -423,10 +423,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
* volume = [[[NSFileManager defaultManager] componentsToDisplayForPath: location] objectAtIndex: 0];
|
||||
NSDictionary * fsAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath: location];
|
||||
uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue],
|
||||
torrentRemaining = [self size] * (uint64_t)(1.0 - [self progress]);
|
||||
torrentRemaining = [self size] - (uint64_t)[self downloadedValid];
|
||||
|
||||
NSLog(@"Volume: %@", volume);
|
||||
NSLog(@"Remaining disk space: %qu (%@)", remainingSpace, [NSString stringForFileSize: remainingSpace]);
|
||||
NSLog(@"Torrent total size: %qu (%@)", [self size], [NSString stringForFileSize: [self size]]);
|
||||
NSLog(@"Torrent remaining size: %qu (%@)", torrentRemaining, [NSString stringForFileSize: torrentRemaining]);
|
||||
|
||||
if (volume && remainingSpace <= torrentRemaining)
|
||||
|
|
Loading…
Add table
Reference in a new issue