Permalink
Browse files

Replace iTunes Media path with ellipsis

  • Loading branch information...
1 parent 941c700 commit 5ad06b36c4eaa72fc72ca4ee194ba92174d4914d @nikreiman nikreiman committed Jun 6, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 DJToolbox/AppDelegate.m
  2. +2 −1 DJToolbox/OrphanedAsdsController.m
View
@@ -182,6 +182,7 @@ - (NSInteger)searchForOrphanedAsds:(NSString *)directory numFilesFound:(NSIntege
NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease];
NSError *error;
NSArray *directoryContents = [fileManager contentsOfDirectoryAtPath:directory error:&error];
+ NSString *libraryPathDisplay = [self.currentLibraryLocation stringByAppendingString:@"/iTunes Media/Music"];
for(NSString *item in directoryContents) {
NSString *absoluteItemPath = [directory stringByAppendingFormat:@"/%@", item];
BOOL isDirectory = NO;
@@ -196,7 +197,7 @@ - (NSInteger)searchForOrphanedAsds:(NSString *)directory numFilesFound:(NSIntege
if([extension isEqualToString:@"asd"]) {
NSString *musicFileName = [absoluteItemPath substringToIndex:lastDot.location];
if(![fileManager fileExistsAtPath:musicFileName]) {
- [self.orphanedAsdsController addOrphanedAsd:absoluteItemPath libraryPath:self.currentLibraryLocation];
+ [self.orphanedAsdsController addOrphanedAsd:absoluteItemPath libraryPath:libraryPathDisplay];
numFilesFound++;
if(numFilesFound == 1) {
[self setProgressMessage:[NSString stringWithFormat:@"%d file found", numFilesFound]];
@@ -29,7 +29,8 @@ - (id)init {
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
NSCell *tableCell = cell;
- [tableCell setTitle:[self.displayNames objectAtIndex:(NSUInteger)row]];
+ NSString *displayTitle = [@"" stringByAppendingString:[self.displayNames objectAtIndex:(NSUInteger)row]];
+ [tableCell setTitle:displayTitle];
}
- (NSString *)pathForSelectedCell:(NSTableView *)tableView {

0 comments on commit 5ad06b3

Please sign in to comment.