diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index be99698e4..08f66f77e 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -1095,7 +1095,7 @@ pe.metadataLoaded = NO; } - [playlistLoader loadInfoForEntries:selectedobjects]; + [playlistLoader performSelectorInBackground:@selector(loadInfoForEntries:) withObject:selectedobjects]; } } diff --git a/Playlist/PlaylistLoader.m b/Playlist/PlaylistLoader.m index c4c31d268..b00495c10 100755 --- a/Playlist/PlaylistLoader.m +++ b/Playlist/PlaylistLoader.m @@ -34,20 +34,6 @@ #import -#if TARGET_CPU_X86 -static int processIsTranslated() { - int ret = 0; - size_t size = sizeof(ret); - if (sysctlbyname("sysctl.proc_translated", &ret, &size, NULL, 0) == -1) - { - if (errno == ENOENT) - return 0; - return -1; - } - return ret; -} -#endif - @implementation PlaylistLoader - (id)init @@ -482,9 +468,6 @@ NSMutableDictionary * dictionaryWithPropertiesOfObject(id obj, NSArray * filterL //Clear the selection [playlistController setSelectionIndexes:[NSIndexSet indexSet]]; -#if TARGET_CPU_X86 - if (processIsTranslated()) -#endif { NSArray* arrayFirst = [NSArray arrayWithObject:[entries objectAtIndex:0]]; NSMutableArray* arrayRest = [entries mutableCopy]; @@ -495,12 +478,6 @@ NSMutableDictionary * dictionaryWithPropertiesOfObject(id obj, NSArray * filterL [self performSelectorInBackground:@selector(loadInfoForEntries:) withObject:arrayRest]; return entries; } -#if TARGET_CPU_X86 - else - { - [self performSelectorOnMainThread:@selector(syncLoadInfoForEntries:) withObject:entries waitUntilDone:YES]; - } -#endif } static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_block_t block) { @@ -708,18 +685,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc if ([entries count]) { -#if TARGET_CPU_X86 - if (processIsTranslated()) -#endif - { - [self performSelectorInBackground:@selector(loadInfoForEntries:) withObject:entries]; - } -#if TARGET_CPU_X86 - else - { - [self performSelectorOnMainThread:@selector(syncLoadInfoForEntries:) withObject:entries waitUntilDone:YES]; - } -#endif + [self performSelectorInBackground:@selector(loadInfoForEntries:) withObject:entries]; } return entries;