Changeset 8548


Ignore:
Timestamp:
May 28, 2009, 1:08:44 AM (12 years ago)
Author:
livings124
Message:

#2123 Remember the manually-added torrent location between launches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r8509 r8548  
    3232
    3333- (id) initWithPath: (NSString *) path hash: (NSString *) hashString torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib
    34         publicTorrent: (NSNumber *) publicTorrent
     34        publicTorrent: (NSNumber *) publicTorrent publicTorrentLocation: (NSString *) publicTorrentLoc
    3535        downloadFolder: (NSString *) downloadFolder
    3636        useIncompleteFolder: (NSNumber *) useIncompleteFolder incompleteFolder: (NSString *) incompleteFolder
     
    8686    self = [self initWithPath: path hash: nil torrentStruct: NULL lib: lib
    8787            publicTorrent: torrentDelete != TORRENT_FILE_DEFAULT ? [NSNumber numberWithBool: torrentDelete == TORRENT_FILE_SAVE] : nil
     88            publicTorrentLocation: path
    8889            downloadFolder: location
    8990            useIncompleteFolder: nil incompleteFolder: nil
     
    109110{
    110111    self = [self initWithPath: nil hash: nil torrentStruct: torrentStruct lib: lib
    111             publicTorrent: [NSNumber numberWithBool: NO]
     112            publicTorrent: [NSNumber numberWithBool: NO] publicTorrentLocation: nil
    112113            downloadFolder: location
    113114            useIncompleteFolder: nil incompleteFolder: nil
     
    123124                torrentStruct: NULL lib: lib
    124125                publicTorrent: [history objectForKey: @"PublicCopy"]
     126                publicTorrentLocation: [history objectForKey: @"TorrentPath"]
    125127                downloadFolder: [history objectForKey: @"DownloadFolder"]
    126128                useIncompleteFolder: [history objectForKey: @"UseIncompleteFolder"]
     
    15941596
    15951597- (id) initWithPath: (NSString *) path hash: (NSString *) hashString torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib
    1596         publicTorrent: (NSNumber *) publicTorrent
     1598        publicTorrent: (NSNumber *) publicTorrent publicTorrentLocation: (NSString *) publicTorrentLoc
    15971599        downloadFolder: (NSString *) downloadFolder
    15981600        useIncompleteFolder: (NSNumber *) useIncompleteFolder incompleteFolder: (NSString *) incompleteFolder
     
    16051607    fDefaults = [NSUserDefaults standardUserDefaults];
    16061608
    1607     fPublicTorrent = path && (publicTorrent ? [publicTorrent boolValue] : ![fDefaults boolForKey: @"DeleteOriginalTorrent"]);
     1609    fPublicTorrent = publicTorrentLoc && (publicTorrent ? [publicTorrent boolValue] : ![fDefaults boolForKey: @"DeleteOriginalTorrent"]);
    16081610    if (fPublicTorrent)
    1609         fPublicTorrentLocation = [path retain];
     1611        fPublicTorrentLocation = [publicTorrentLoc retain];
    16101612   
    16111613    fDownloadFolder = downloadFolder ? downloadFolder : [fDefaults stringForKey: @"DownloadFolder"];
Note: See TracChangeset for help on using the changeset viewer.