Changeset 2195


Ignore:
Timestamp:
Jun 25, 2007, 1:15:25 AM (16 years ago)
Author:
livings124
Message:

don't allow single-file torrents to have priority/download check changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r2189 r2195  
    13391339    for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    13401340    {
    1341         if (tr_torrentGetFilePriority(fHandle, index) != TR_PRI_DND || [self fileProgress: index] >= 1.0)
     1341        if (tr_torrentGetFilePriority(fHandle, index) != TR_PRI_DND
     1342                || [self canChangeDownloadCheckForFiles: [NSIndexSet indexSetWithIndex: index]])
    13421343            onState = YES;
    13431344        else
     
    13521353- (BOOL) canChangeDownloadCheckForFiles: (NSIndexSet *) indexSet
    13531354{
     1355    if ([self fileCount] <= 1)
     1356        return NO;
     1357   
    13541358    int index;
    13551359    for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
     
    14141418    for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    14151419        if (priority == [[[fFlatFileList objectAtIndex: index] objectForKey: @"Priority"] intValue]
    1416                 && [self fileProgress: index] < 1.0)
     1420                && [self canChangeDownloadCheckForFiles: [NSIndexSet indexSetWithIndex: index]])
    14171421            return YES;
    14181422    return NO;
Note: See TracChangeset for help on using the changeset viewer.