diff --git a/Audio/AudioPlayer.m b/Audio/AudioPlayer.m index e9e8d40a4..4567738c6 100644 --- a/Audio/AudioPlayer.m +++ b/Audio/AudioPlayer.m @@ -25,8 +25,6 @@ outputLaunched = NO; chainQueue = [[NSMutableArray alloc] init]; - - [[PluginController sharedPluginController] setup]; } return self; diff --git a/Audio/Plugin.h b/Audio/Plugin.h index 56a85e453..a8b80e4be 100644 --- a/Audio/Plugin.h +++ b/Audio/Plugin.h @@ -48,6 +48,8 @@ @end @protocol CogPluginController ++ (id)sharedPluginController; + - (NSDictionary *)sources; - (NSDictionary *)containers; - (NSDictionary *)metadataReaders; diff --git a/Audio/PluginController.h b/Audio/PluginController.h index bd88d19ef..1491aecd5 100644 --- a/Audio/PluginController.h +++ b/Audio/PluginController.h @@ -20,8 +20,6 @@ BOOL isSetup; } -+ (PluginController *)sharedPluginController; //Use this to get the instance. - - (void)setup; - (void)printPluginInfo; diff --git a/Audio/PluginController.m b/Audio/PluginController.m index 8fee5f278..484ba4194 100644 --- a/Audio/PluginController.m +++ b/Audio/PluginController.m @@ -6,7 +6,7 @@ //Start of singleton-related stuff. static PluginController *sharedPluginController = nil; -+ (PluginController*)sharedPluginController ++ (id)sharedPluginController { @synchronized(self) { if (sharedPluginController == nil) { @@ -68,6 +68,8 @@ static PluginController *sharedPluginController = nil; decodersByExtension = [[NSMutableDictionary alloc] init]; decodersByMimeType = [[NSMutableDictionary alloc] init]; + + [self setup]; } return self; diff --git a/Plugins/CueSheet/CueSheet.m b/Plugins/CueSheet/CueSheet.m index 57489a6bf..aea82deb1 100644 --- a/Plugins/CueSheet/CueSheet.m +++ b/Plugins/CueSheet/CueSheet.m @@ -179,7 +179,7 @@ NSString* originalURL = [url path]; NSString *ext; - NSEnumerator *e = [[NSClassFromString(@"PluginController") decodersByExtension] objectEnumerator]; + NSEnumerator *e = [[[NSClassFromString(@"PluginController") sharedPluginController] decodersByExtension] objectEnumerator]; while (ext = [e nextObject]) { NSMutableString* newURL = [originalURL mutableCopy];