[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>
main
Christopher Snowhill 2022-07-21 04:16:08 -07:00
parent 8f7b26cb5d
commit 9ced34a87c
1 changed files with 8 additions and 1 deletions

View File

@ -892,7 +892,14 @@ static void *playlistControllerContext = &playlistControllerContext;
pe.deLeted = NO;
}
// 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];