Changeset 952


Ignore:
Timestamp:
Sep 28, 2006, 5:38:10 PM (15 years ago)
Author:
livings124
Message:

hopefully a bit better...now just figure out a way to get the progress before starting a torrent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r951 r952  
    424424    NSDictionary * fsAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath: location];
    425425    uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue],
    426             torrentRemaining = [self size] * (uint64_t)(1.0 - [self progress]);
     426            torrentRemaining = [self size] - (uint64_t)[self downloadedValid];
    427427   
    428428    NSLog(@"Volume: %@", volume);
    429429    NSLog(@"Remaining disk space: %qu (%@)", remainingSpace, [NSString stringForFileSize: remainingSpace]);
     430    NSLog(@"Torrent total size: %qu (%@)", [self size], [NSString stringForFileSize: [self size]]);
    430431    NSLog(@"Torrent remaining size: %qu (%@)", torrentRemaining, [NSString stringForFileSize: torrentRemaining]);
    431432   
Note: See TracChangeset for help on using the changeset viewer.