Changeset 1046
- Timestamp:
- Oct 31, 2006, 8:53:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r1045 r1046 1570 1570 if ([[file pathExtension] caseInsensitiveCompare: @"torrent"] == NSOrderedSame) 1571 1571 { 1572 oldCount = [fTorrents count];1573 [self openFiles: [NSArray arrayWithObject: [path stringByAppendingPathComponent: file]]];1572 int error; 1573 tr_torrent_t * tempTor = tr_torrentInit(fLib, [path UTF8String], 0, & error); 1574 1574 1575 //import only actually happened if the torrent array is larger 1576 if (oldCount < [fTorrents count]) 1575 if (tempTor) 1577 1576 { 1578 [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Torrent File Auto Added", 1579 "Growl notification title") description: file 1580 notificationName: GROWL_AUTO_ADD iconData: nil priority: 0 isSticky: NO clickContext: nil]; 1577 tr_torrentClose(fLib, tempTor); 1578 1579 int count = [fTorrents count]; 1580 [self openFiles: [NSArray arrayWithObject: [path stringByAppendingPathComponent: file]]]; 1581 1582 //check if torrent was opened 1583 if ([fTorrents count] > count) 1584 { 1585 [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Torrent File Auto Added", 1586 "Growl notification title") description: file 1587 notificationName: GROWL_AUTO_ADD iconData: nil priority: 0 isSticky: NO clickContext: nil]; 1588 } 1581 1589 } 1582 else 1583 [fAutoImportedNames removeObjectIdenticalTo: file]; //failed to import, possibly because not fully downloaded 1590 else if (error != TR_EUNSUPPORTED || error != TR_EDUPLICATE) 1591 [fAutoImportedNames removeObjectIdenticalTo: file]; //failed to import for unknown reason, so try again later 1592 else; 1584 1593 } 1585 1594 }
Note: See TracChangeset
for help on using the changeset viewer.