1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 22:22:58 +00:00

display progress of retrieving metadata on a magnetized transfer

This commit is contained in:
Mitchell Livingston 2009-11-27 03:20:19 +00:00
parent d7d5bb6db7
commit 95328f5535
4 changed files with 11 additions and 4 deletions

View file

@ -946,9 +946,13 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
return; return;
} }
#warning show add window perhaps?
#warning should we do this? #warning should we do this?
[torrent setWaitToStart: [fDefaults boolForKey: @"AutoStartDownload"]]; [torrent setWaitToStart: [fDefaults boolForKey: @"AutoStartDownload"]];
#warning should set group
[torrent update]; [torrent update];
[fTorrents addObject: torrent]; [fTorrents addObject: torrent];
[torrent release]; [torrent release];

View file

@ -51,7 +51,6 @@
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>magnet</string> <string>magnet</string>
<string>dht</string>
</array> </array>
<key>CFBundleURLName</key> <key>CFBundleURLName</key>
<string>BitTorrent Magnet URL</string> <string>BitTorrent Magnet URL</string>

View file

@ -809,7 +809,7 @@ int trashDataFile(const char * filename)
- (BOOL) allDownloaded - (BOOL) allDownloaded
{ {
return [self sizeLeft] == 0; return [self sizeLeft] == 0 && ![self isMagnet];
} }
- (BOOL) isComplete - (BOOL) isComplete
@ -909,8 +909,12 @@ int trashDataFile(const char * filename)
- (NSString *) progressString - (NSString *) progressString
{ {
if ([self isMagnet]) if ([self isMagnet])
{
NSString * progressString = [NSString localizedStringWithFormat: @"%.2f%% of torrent metadata retrieved",
fStat->metadataPercentComplete];
return [NSString stringWithFormat: @"%@ - %@", NSLocalizedString(@"Magnetized transfer", "Torrent -> progress string"), return [NSString stringWithFormat: @"%@ - %@", NSLocalizedString(@"Magnetized transfer", "Torrent -> progress string"),
NSLocalizedString(@"torrent information needed", "Torrent -> progress string")]; progressString];
}
NSString * string; NSString * string;

View file

@ -629,7 +629,7 @@
} }
} }
if (![torrent allDownloaded] && ![torrent isMagnet]) if (![torrent allDownloaded])
{ {
const CGFloat widthRemaining = round(NSWidth(barRect) * [torrent progressLeft]); const CGFloat widthRemaining = round(NSWidth(barRect) * [torrent progressLeft]);