Changeset 458


Ignore:
Timestamp:
Jun 24, 2006, 4:42:55 AM (16 years ago)
Author:
livings124
Message:

Use the order value for queueing rather than the date.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r454 r458  
    955955        else
    956956        {
    957             //use as next if it is waiting to start and either no previous is or the previous has later date
     957            //use as next if it is waiting to start and either no previous or order value is lower
    958958            if ([torrent waitingToStart] && (!torrentToStart
    959                 || [[torrentToStart date] compare: [torrent date]] == NSOrderedDescending))
     959                || [[torrentToStart orderValue] compare: [torrent orderValue]] == NSOrderedDescending))
    960960                torrentToStart = torrent;
    961961        }
     
    10151015            if (amountToStart < waitingCount)
    10161016            {
    1017                 NSSortDescriptor * dateDescriptor = [[[NSSortDescriptor alloc] initWithKey:
    1018                                                             @"date" ascending: YES] autorelease];
    1019                 NSArray * descriptors = [[NSArray alloc] initWithObjects: dateDescriptor, nil];
     1017                NSSortDescriptor * orderDescriptor = [[[NSSortDescriptor alloc] initWithKey:
     1018                                                            @"orderValue" ascending: YES] autorelease];
     1019                NSArray * descriptors = [[NSArray alloc] initWithObjects: orderDescriptor, nil];
    10201020               
    10211021                [waitingTorrents sortUsingDescriptors: descriptors];
Note: See TracChangeset for help on using the changeset viewer.