Changeset 9433 for trunk/macosx/Controller.m
- Timestamp:
- Oct 29, 2009, 2:45:58 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r9432 r9433 847 847 } 848 848 849 tr_info info;850 849 for (NSString * torrentPath in filenames) 851 850 { … … 853 852 tr_ctor * ctor = tr_ctorNew(fLib); 854 853 tr_ctorSetMetainfoFromFile(ctor, [torrentPath UTF8String]); 855 tr_parse_result result = tr_torrentParse(ctor, &info); 854 855 tr_info info; 856 const tr_parse_result result = tr_torrentParse(ctor, &info); 857 tr_ctorFree(ctor); 858 856 859 if (result != TR_PARSE_OK) 857 860 { … … 866 869 NSAssert2(NO, @"Unknown error code (%d) when attempting to open \"%@\"", result, torrentPath); 867 870 868 tr_ctorFree(ctor);869 871 tr_metainfoFree(&info); 870 872 continue; 871 873 } 872 873 tr_ctorFree(ctor);874 874 875 875 //determine download location … … 889 889 890 890 //determine to show the options window 891 BOOL showWindow = type == ADD_SHOW_OPTIONS || ([fDefaults boolForKey: @"DownloadAsk"]892 && (info.isMultifile || ![fDefaults boolForKey: @"DownloadAskMulti"])893 && (type != ADD_AUTO || ![fDefaults boolForKey: @"DownloadAskManual"]));891 const BOOL showWindow = type == ADD_SHOW_OPTIONS || ([fDefaults boolForKey: @"DownloadAsk"] 892 && (info.isMultifile || ![fDefaults boolForKey: @"DownloadAskMulti"]) 893 && (type != ADD_AUTO || ![fDefaults boolForKey: @"DownloadAskManual"])); 894 894 tr_metainfoFree(&info); 895 895 … … 2001 2001 if ([torrent isActive] && ![torrent isCheckingWaiting]) 2002 2002 { 2003 const BOOL isActive = ![torrent isStalled]; 2004 if (isActive) 2005 active++; 2006 2003 2007 if ([torrent isSeeding]) 2004 2008 { 2005 2009 seeding++; 2006 BOOL isActive = ![torrent isStalled];2007 if (isActive)2008 active++;2009 2010 2010 if (filterStatus && !((filterActive && isActive) || filterSeed)) 2011 2011 continue; … … 2014 2014 { 2015 2015 downloading++; 2016 BOOL isActive = ![torrent isStalled];2017 if (isActive)2018 active++;2019 2020 2016 if (filterStatus && !((filterActive && isActive) || filterDownload)) 2021 2017 continue;
Note: See TracChangeset
for help on using the changeset viewer.