[Playlist Insert] Add a further bodge fix

I wish people would stop adding files to the playlist while there's a
search filter in place.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
xcode15
Christopher Snowhill 2022-07-21 04:16:08 -07:00
parent e14c630034
commit 9c4d9ebb2e
1 changed files with 8 additions and 1 deletions

View File

@ -892,7 +892,14 @@ static void *playlistControllerContext = &playlistControllerContext;
pe.deLeted = NO; pe.deLeted = NO;
} }
[super insertObjects:objects atArrangedObjectIndexes:indexes]; // further bodge fix
@try {
[super insertObjects:objects atArrangedObjectIndexes:indexes];
}
@catch(id anException) {
indexes = [NSMutableIndexSet indexSetWithIndexesInRange:NSMakeRange(count, [objects count])];
[super insertObjects:objects atArrangedObjectIndexes:indexes];
}
[self commitPersistentStore]; [self commitPersistentStore];