if the download finishes/becomes unfinished, keep trying to reset the time machine setting, and other miscellaneous cleanup
This commit is contained in:
parent
7ce8312ddc
commit
1f0b346295
|
@ -29,7 +29,7 @@
|
|||
{
|
||||
tr_handle * fLib;
|
||||
|
||||
NSImage * fDockIcon, * fBadge, * fUploadBadge, * fDownloadBadge;
|
||||
NSImage * fDockIcon, * fBadge, * fUploadBadge;
|
||||
|
||||
NSDictionary * fAttributes;
|
||||
int fCompleted, fCompletedBadged;
|
||||
|
|
|
@ -173,11 +173,8 @@
|
|||
stringRect.origin.y += spaceBetween;
|
||||
}
|
||||
|
||||
if (!fDownloadBadge)
|
||||
fDownloadBadge = [NSImage imageNamed: @"DownloadBadge"];
|
||||
|
||||
//place badge and text
|
||||
[fDownloadBadge compositeToPoint: badgeRect.origin operation: NSCompositeSourceOver];
|
||||
[[NSImage imageNamed: @"DownloadBadge"] compositeToPoint: badgeRect.origin operation: NSCompositeSourceOver];
|
||||
[self badgeString: downloadRateString forRect: stringRect];
|
||||
}
|
||||
|
||||
|
|
|
@ -592,6 +592,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
//wait for running transfers to stop and for NAT to be disabled (5 second timeout)
|
||||
NSDate * startDate = [NSDate date];
|
||||
|
||||
#warning do this in tr_close?
|
||||
while ([startDate timeIntervalSinceNow] >= -5.0 && tr_handleStatus(fLib)->natTraversalStatus != TR_NAT_TRAVERSAL_DISABLED)
|
||||
usleep(100000);
|
||||
|
||||
|
|
|
@ -1631,7 +1631,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
if ([NSApp isOnLeopardOrBetter])
|
||||
{
|
||||
NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
|
||||
CSBackupSetItemExcluded((CFURLRef)url, false, false);
|
||||
fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, false, false) != noErr;
|
||||
}
|
||||
|
||||
fStat = tr_torrentStat(fHandle);
|
||||
|
@ -1643,7 +1643,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
if ([NSApp isOnLeopardOrBetter])
|
||||
{
|
||||
NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
|
||||
CSBackupSetItemExcluded((CFURLRef)url, true, false);
|
||||
fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, true, false) != noErr;
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentRestartedDownloading" object: self];
|
||||
|
|
Loading…
Reference in New Issue