Changeset 9736


Ignore:
Timestamp:
Dec 13, 2009, 1:40:53 AM (12 years ago)
Author:
livings124
Message:

eliminate redundant code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r9735 r9736  
    15431543    if (torrentStruct)
    15441544        fHandle = torrentStruct;
    1545     else if (magnetAddress)
    1546     {
    1547         tr_ctor * ctor = tr_ctorNew(lib);
    1548        
    1549         tr_ctorSetPaused(ctor, TR_FORCE, YES);
    1550         if (downloadFolder)
    1551             tr_ctorSetDownloadDir(ctor, TR_FORCE, [downloadFolder UTF8String]);
    1552        
    1553         const tr_parse_result result = tr_ctorSetMagnet(ctor, [magnetAddress UTF8String]);
    1554        
    1555         if (result == TR_PARSE_OK)
    1556             fHandle = tr_torrentNew(ctor, NULL);
    1557        
    1558         tr_ctorFree(ctor);
    1559        
    1560         if (!fHandle)
    1561         {
    1562             [self release];
    1563             return nil;
    1564         }
    1565     }
    15661545    else
    15671546    {
     
    15781557        if (path)
    15791558            result = tr_ctorSetMetainfoFromFile(ctor, [path UTF8String]);
     1559       
     1560        if (result != TR_PARSE_OK && magnetAddress)
     1561            result = tr_ctorSetMagnet(ctor, [magnetAddress UTF8String]);
    15801562       
    15811563        //backup - shouldn't be needed after upgrade to 1.70
Note: See TracChangeset for help on using the changeset viewer.