fix starting transfers when adding
This commit is contained in:
parent
5df3c77cf2
commit
154f2f96af
|
@ -2644,7 +2644,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
NSUInteger insertIndex = topTorrent ? [fTorrents indexOfObject: topTorrent] + 1 : 0;
|
||||
NSIndexSet * insertIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(insertIndex, [movingTorrents count])];
|
||||
for (Torrent * torrent in movingTorrents)
|
||||
[torrent setQueueIndex: insertIndex++];
|
||||
[torrent setQueuePosition: insertIndex++];
|
||||
[fTorrents insertObjects: movingTorrents atIndexes: insertIndexes];
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,8 @@
|
|||
- (void) sleep;
|
||||
- (void) wakeUp;
|
||||
|
||||
- (void) setQueueIndex: (NSUInteger) index;
|
||||
- (NSInteger) queuePosition;
|
||||
- (void) setQueuePosition: (NSUInteger) index;
|
||||
|
||||
- (void) manualAnnounce;
|
||||
- (BOOL) canManualAnnounce;
|
||||
|
@ -127,7 +128,6 @@
|
|||
- (NSImage *) icon;
|
||||
|
||||
- (NSString *) name;
|
||||
- (NSInteger) queuePosition;
|
||||
- (BOOL) isFolder;
|
||||
- (uint64_t) size;
|
||||
- (uint64_t) sizeLeft;
|
||||
|
|
|
@ -302,7 +302,7 @@ int trashDataFile(const char * filename)
|
|||
|
||||
- (void) startTransferNoQueue
|
||||
{
|
||||
if (![self isActive] && [self alertForRemainingDiskSpace])
|
||||
if ([self alertForRemainingDiskSpace])
|
||||
{
|
||||
tr_torrentStartNow(fHandle);
|
||||
[self update];
|
||||
|
@ -315,7 +315,7 @@ int trashDataFile(const char * filename)
|
|||
#warning merge
|
||||
- (void) startTransfer
|
||||
{
|
||||
if (![self isActive] && ![self waitingToStart] && [self alertForRemainingDiskSpace])
|
||||
if ([self alertForRemainingDiskSpace])
|
||||
{
|
||||
tr_torrentStart(fHandle);
|
||||
[self update];
|
||||
|
@ -327,11 +327,8 @@ int trashDataFile(const char * filename)
|
|||
|
||||
- (void) stopTransfer
|
||||
{
|
||||
if ([self isActive] || [self waitingToStart])
|
||||
{
|
||||
tr_torrentStop(fHandle);
|
||||
[self update];
|
||||
}
|
||||
tr_torrentStop(fHandle);
|
||||
[self update];
|
||||
}
|
||||
|
||||
- (void) sleep
|
||||
|
@ -349,7 +346,13 @@ int trashDataFile(const char * filename)
|
|||
}
|
||||
}
|
||||
|
||||
- (void) setQueueIndex: (NSUInteger) index
|
||||
#warning remove
|
||||
- (NSInteger) queuePosition
|
||||
{
|
||||
return fStat->queuePosition;
|
||||
}
|
||||
|
||||
- (void) setQueuePosition: (NSUInteger) index
|
||||
{
|
||||
tr_torrentSetQueuePosition(fHandle, index);
|
||||
}
|
||||
|
@ -617,12 +620,6 @@ int trashDataFile(const char * filename)
|
|||
return fInfo->name != NULL ? [NSString stringWithUTF8String: fInfo->name] : fHashString;
|
||||
}
|
||||
|
||||
#warning remove
|
||||
- (NSInteger) queuePosition
|
||||
{
|
||||
return fStat->queuePosition;
|
||||
}
|
||||
|
||||
- (BOOL) isFolder
|
||||
{
|
||||
return fInfo->isMultifile;
|
||||
|
|
Loading…
Reference in New Issue