Fixed sorting for non-0 padded files.
parent
983699ab2f
commit
3b9d20fdc5
|
@ -201,15 +201,11 @@
|
|||
NSArray *sortedURLs;
|
||||
if (sort == YES)
|
||||
{
|
||||
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"absoluteString" ascending:YES];
|
||||
|
||||
sortedURLs = [expandedURLs sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]];
|
||||
|
||||
[sortDescriptor release];
|
||||
sortedURLs = [expandedURLs sortedArrayUsingSelector:@selector(compareTrackNumbers:)];
|
||||
}
|
||||
else
|
||||
{
|
||||
sortedURLs = [expandedURLs copy];
|
||||
sortedURLs = expandedURLs;
|
||||
}
|
||||
|
||||
for (url in sortedURLs)
|
||||
|
|
|
@ -14,3 +14,9 @@
|
|||
- (NSComparisonResult)compareTrackNumbers:(NSString *)aString;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSURL (CogSort)
|
||||
|
||||
- (NSComparisonResult)compareTrackNumbers:(NSURL *)aURL;
|
||||
|
||||
@end
|
||||
|
|
|
@ -19,3 +19,12 @@
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSURL (CogSort)
|
||||
|
||||
- (NSComparisonResult)compareTrackNumbers:(NSURL *)aURL
|
||||
{
|
||||
return [[self absoluteString] compareTrackNumbers:[aURL absoluteString]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue