Changeset 2230


Ignore:
Timestamp:
Jun 29, 2007, 4:38:33 AM (15 years ago)
Author:
livings124
Message:

make sure all history items are actually saved, and don't start all transfers at app launch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r2226 r2230  
    139139- (NSDictionary *) history
    140140{
     141    #warning not all being stored
    141142    NSMutableDictionary * history = [NSMutableDictionary dictionaryWithObjectsAndKeys:
    142143                    [NSNumber numberWithBool: fPublicTorrent], @"PublicCopy",
     
    144145                    fDownloadFolder, @"DownloadFolder",
    145146                    [NSNumber numberWithBool: fUseIncompleteFolder], @"UseIncompleteFolder",
    146                     fIncompleteFolder, @"IncompleteFolder",
    147147                    [NSNumber numberWithBool: [self isActive]], @"Active",
    148148                    fDateAdded, @"Date",
     
    156156                    [self orderValue], @"OrderValue",
    157157                    nil];
     158   
     159    if (fIncompleteFolder)
     160        [history setObject: fIncompleteFolder forKey: @"IncompleteFolder"];
    158161   
    159162    //set file should download
     
    15071510            currentDownloadFolder = [self shouldUseIncompleteFolderForName: [NSString stringWithUTF8String: info.name]]
    15081511                                        ? fIncompleteFolder : fDownloadFolder;
    1509             fHandle = tr_torrentInitSaved(fLib, [hashString UTF8String], [currentDownloadFolder UTF8String], TR_FLAG_SAVE, &error);
     1512            fHandle = tr_torrentInitSaved(fLib, [hashString UTF8String], [currentDownloadFolder UTF8String],
     1513                                            TR_FLAG_SAVE | TR_FLAG_PAUSED, &error);
    15101514        }
    15111515        tr_metainfoFree(&info);
     
    15171521            currentDownloadFolder = [self shouldUseIncompleteFolderForName: [NSString stringWithUTF8String: info.name]]
    15181522                                        ? fIncompleteFolder : fDownloadFolder;
    1519             fHandle = tr_torrentInit(fLib, [path UTF8String], [currentDownloadFolder UTF8String], TR_FLAG_SAVE, &error);
     1523            fHandle = tr_torrentInit(fLib, [path UTF8String], [currentDownloadFolder UTF8String],
     1524                                        TR_FLAG_SAVE | TR_FLAG_PAUSED, &error);
    15201525        }
    15211526        tr_metainfoFree(&info);
Note: See TracChangeset for help on using the changeset viewer.