Ignore:
Timestamp:
Jul 11, 2008, 9:48:43 PM (14 years ago)
Author:
livings124
Message:

#1042: show "in progress" in the inspector when announcing/scraping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r6265 r6325  
    734734{
    735735    int date = fStat->nextAnnounceTime;
    736     if (date <= 0)
    737         return -1;
    738    
    739     NSTimeInterval difference = [[NSDate dateWithTimeIntervalSince1970: date] timeIntervalSinceNow];
    740     return difference > 0 ? (int)difference : -1;
     736    NSTimeInterval difference;
     737    switch (date)
     738    {
     739        case 0:
     740            return STAT_TIME_NONE;
     741        case 1:
     742            return STAT_TIME_NOW;
     743        default:
     744            difference = [[NSDate dateWithTimeIntervalSince1970: date] timeIntervalSinceNow];
     745            return difference > 0 ? (int)difference : STAT_TIME_NONE;
     746    }
    741747}
    742748
     
    760766{
    761767    int date = fStat->nextScrapeTime;
    762     if (date <= 0)
    763         return -1;
    764    
    765     NSTimeInterval difference = [[NSDate dateWithTimeIntervalSince1970: date] timeIntervalSinceNow];
    766     return difference > 0 ? (int)difference : -1;
     768    NSTimeInterval difference;
     769    switch (date)
     770    {
     771        case 0:
     772            return STAT_TIME_NONE;
     773        case 1:
     774            return STAT_TIME_NOW;
     775        default:
     776            difference = [[NSDate dateWithTimeIntervalSince1970: date] timeIntervalSinceNow];
     777            return difference > 0 ? (int)difference : STAT_TIME_NONE;
     778    }
    767779}
    768780
Note: See TracChangeset for help on using the changeset viewer.