use the last attempted update of the blocklist for scheduling weekly updates

This commit is contained in:
Mitchell Livingston
2010-10-31 19:24:26 +00:00
parent 866c25ec14
commit c124077cce
4 changed files with 23 additions and 52 deletions

View File

@@ -504,7 +504,15 @@ tr_session * fHandle;
NSString * updatedDateString;
if (exists)
{
NSDate * updatedDate = [fDefaults objectForKey: @"BlocklistLastUpdate"];
NSDate * updatedDate = [fDefaults objectForKey: @"BlocklistNewLastUpdateSuccess"];
//old format for update date pre-2.12
if (!updatedDate)
{
updatedDate = [fDefaults objectForKey: @"BlocklistLastUpdate"];
[fDefaults setObject: updatedDate forKey: @"BlocklistNewLastUpdateSuccess"];
[fDefaults removeObjectForKey: @"BlocklistLastUpdate"];
}
if (updatedDate)
{
if ([NSApp isOnSnowLeopardOrBetter])