Searches for a missing server when a new one gets registered.
authorKent Sutherland <ksuther@ithinksw.com>
Mon, 24 May 2004 13:46:33 +0000 (13:46 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Mon, 24 May 2004 13:46:33 +0000 (13:46 +0000)
MainController.h
MainController.m
NetworkController.m

index d29e371..6db9977 100755 (executable)
@@ -77,6 +77,7 @@
 - (void)setServerStatus:(BOOL)newStatus;
 - (int)connectToServer;
 - (BOOL)disconnectFromServer;
+- (void)checkForRemoteServer;
 - (void)networkError:(NSException *)exception;
 
 //
index c2acaf1..011f73e 100755 (executable)
@@ -33,7 +33,6 @@
 @interface MainController(Private)
 - (ITMTRemote *)loadRemote;
 - (void)setLatestSongIdentifier:(NSString *)newIdentifier;
-- (void)checkForRemoteServer;
 - (void)applicationLaunched:(NSNotification *)note;
 - (void)applicationTerminated:(NSNotification *)note;
 @end
index 33cee8f..41bf4ac 100755 (executable)
@@ -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];
 }