Changeset 1149 for trunk/macosx


Ignore:
Timestamp:
Dec 2, 2006, 1:46:54 AM (15 years ago)
Author:
joshe
Message:

Merge scrape branch:

Automatically scrape trackers as needed.
If tracker supplies a trackerid then use it (untested).
Use tracker's min interval, clamped to the same range as interval.
Show total completed downloads in the MacOS X frontend.

Location:
trunk/macosx
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/English.lproj/InfoWindow.nib/classes.nib

    r1124 r1149  
    2020            OUTLETS = {
    2121                fCommentView = NSTextView;
     22                fCompletedFromTrackerField = NSTextField;
    2223                fConnectedPeersField = NSTextField;
    2324                fCreatorField = NSTextField;
  • trunk/macosx/InfoWindowController.h

    r1124 r1149  
    5050    IBOutlet NSTableView * fPeerTable;
    5151    IBOutlet NSTextField * fSeedersField, * fLeechersField, * fConnectedPeersField,
    52                         * fDownloadingFromField, * fUploadingToField;
     52                        * fDownloadingFromField, * fUploadingToField, * fCompletedFromTrackerField;
    5353   
    5454    IBOutlet NSTableView * fFileTable;
  • trunk/macosx/InfoWindowController.m

    r1125 r1149  
    182182        [fSeedersField setStringValue: @""];
    183183        [fLeechersField setStringValue: @""];
     184        [fCompletedFromTrackerField setStringValue: @""];
    184185        [fConnectedPeersField setStringValue: @""];
    185186        [fDownloadingFromField setStringValue: @""];
     
    327328    Torrent * torrent = [fTorrents objectAtIndex: 0];
    328329   
    329     int seeders = [torrent seeders], leechers = [torrent leechers];
     330    int seeders = [torrent seeders], leechers = [torrent leechers], downloaded = [torrent completedFromTracker];
    330331    [fSeedersField setStringValue: seeders < 0 ? @"" : [NSString stringWithInt: seeders]];
    331332    [fLeechersField setStringValue: leechers < 0 ? @"" : [NSString stringWithInt: leechers]];
     333    [fCompletedFromTrackerField setStringValue: downloaded < 0 ? @"" : [NSString stringWithInt: downloaded]];
    332334   
    333335    BOOL active = [torrent isActive];
  • trunk/macosx/Torrent.h

    r1119 r1149  
    143143- (int) seeders;
    144144- (int) leechers;
     145- (int) completedFromTracker;
    145146- (int) totalPeers;
    146147- (int) totalPeersIncoming;
  • trunk/macosx/Torrent.m

    r1119 r1149  
    726726{
    727727    int date = fInfo->dateCreated;
    728     return date > 0 ? [NSDate dateWithTimeIntervalSince1970: fInfo->dateCreated] : nil;
     728    return date > 0 ? [NSDate dateWithTimeIntervalSince1970: date] : nil;
    729729}
    730730
     
    882882{
    883883    return fStat->leechers;
     884}
     885
     886- (int) completedFromTracker
     887{
     888    return fStat->completedFromTracker;
    884889}
    885890
Note: See TracChangeset for help on using the changeset viewer.