Changeset 3924
- Timestamp:
- Nov 22, 2007, 3:34:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r3922 r3924 3345 3345 - (BOOL) ipcAddTorrentFileAutostart: (NSString *) path directory: (NSString *) directory autostart: (BOOL) autostart 3346 3346 { 3347 /* 'path' is path to torrent file, 'dir' is the directory it 3348 should download it's files to and may be nil, 'autostart' is a 3349 boolean indicating if the torrent should be automatically 3350 started (or queued to start, I guess), should return NO if 3351 torrent fails to load */ 3352 return NO; 3347 NSArray * torrents; 3348 if (autostart) 3349 torrents = [fTorrents copy]; 3350 BOOL success = [self ipcAddTorrentFile: path directory: directory]; 3351 3352 if (success && autostart) 3353 { 3354 NSEnumerator * enumerator = [torrents objectEnumerator]; 3355 Torrent * torrent; 3356 while ((torrent = [enumerator nextObject])) 3357 if (![torrents containsObject: torrent]) 3358 break; 3359 3360 if (torrent) 3361 [torrent startTransfer]; 3362 else 3363 success = NO; 3364 } 3365 3366 [torrents release]; 3367 return success; 3353 3368 } 3354 3369
Note: See TracChangeset
for help on using the changeset viewer.