Changeset 9597


Ignore:
Timestamp:
Nov 27, 2009, 3:44:00 AM (11 years ago)
Author:
livings124
Message:

generate the file list when a magnetized transfer retrieves its metadata

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r9595 r9597  
    4343
    4444- (void) completenessChange: (NSNumber *) status;
    45 
    4645- (void) ratioLimitHit;
     46- (void) metadataRetrieved;
    4747
    4848- (NSString *) etaString;
     
    6161{
    6262    [(Torrent *)torrentData performSelectorOnMainThread: @selector(ratioLimitHit) withObject: nil waitUntilDone: NO];
     63}
     64
     65void metadataCallback(tr_torrent * torrent, void * torrentData)
     66{
     67    [(Torrent *)torrentData performSelectorOnMainThread: @selector(metadataRetrieved) withObject: nil waitUntilDone: NO];
    6368}
    6469
     
    15771582    tr_torrentSetCompletenessCallback(fHandle, completenessChangeCallback, self);
    15781583    tr_torrentSetRatioLimitHitCallback(fHandle, ratioLimitHitCallback, self);
     1584    tr_torrentSetMetadataCallback(fHandle, metadataCallback, self);
    15791585   
    15801586    fHashString = [[NSString alloc] initWithUTF8String: fInfo->hashString];
     
    17321738}
    17331739
     1740- (void) metadataRetrieved
     1741{
     1742    fStat = tr_torrentStat(fHandle);
     1743   
     1744    [self createFileList];
     1745   
     1746    #warning update inspector
     1747}
     1748
    17341749- (NSString *) etaString
    17351750{
Note: See TracChangeset for help on using the changeset viewer.