From 0e4a6623849f7fd40f3c577e08e9ca999abdcc7e Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Mon, 24 May 2004 13:46:33 +0000 Subject: [PATCH] Searches for a missing server when a new one gets registered. --- MainController.h | 1 + MainController.m | 1 - NetworkController.m | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/MainController.h b/MainController.h index d29e371..6db9977 100755 --- a/MainController.h +++ b/MainController.h @@ -77,6 +77,7 @@ - (void)setServerStatus:(BOOL)newStatus; - (int)connectToServer; - (BOOL)disconnectFromServer; +- (void)checkForRemoteServer; - (void)networkError:(NSException *)exception; // diff --git a/MainController.m b/MainController.m index c2acaf1..011f73e 100755 --- a/MainController.m +++ b/MainController.m @@ -33,7 +33,6 @@ @interface MainController(Private) - (ITMTRemote *)loadRemote; - (void)setLatestSongIdentifier:(NSString *)newIdentifier; -- (void)checkForRemoteServer; - (void)applicationLaunched:(NSNotification *)note; - (void)applicationTerminated:(NSNotification *)note; @end diff --git a/NetworkController.m b/NetworkController.m index 33cee8f..41bf4ac 100755 --- a/NetworkController.m +++ b/NetworkController.m @@ -308,6 +308,9 @@ static NetworkController *sharedController; { ITDebugLog(@"Resolved service named %@.", [sender name]); [[NSNotificationCenter defaultCenter] postNotificationName:@"ITMTFoundNetService" object:nil]; + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"useSharedPlayer"] && !connectedToServer) { + [[MainController sharedController] checkForRemoteServer]; + } [sender stop]; } -- 2.20.1