X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/28b26b0acce681c25cd8bf5ac7fc8881794afb36..82086d6a95408227f929ca149591c6fc3962f043:/MainController.m diff --git a/MainController.m b/MainController.m index c235a8f..ad6f2e1 100755 --- a/MainController.m +++ b/MainController.m @@ -1091,6 +1091,11 @@ static MainController *sharedController; if (result == 1) { [[PreferencesController sharedPrefs] resetRemotePlayerTextFields]; currentRemote = [[[networkController networkObject] remote] retain]; + + [self setupHotKeys]; + //playerRunningState = ITMTRemotePlayerRunning; + playerRunningState = [[self currentRemote] playerRunningState]; + [refreshTimer invalidate]; refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:([networkController isConnectedToServer] ? 10.0 : 0.5) target:self @@ -1182,7 +1187,7 @@ static MainController *sharedController; - (void)applicationLaunched:(NSNotification *)note { NS_DURING - if (!note || [[[note userInfo] objectForKey:@"NSApplicationName"] isEqualToString:[[self currentRemote] playerFullName]]) { + if (!note || ([[[note userInfo] objectForKey:@"NSApplicationName"] isEqualToString:[[self currentRemote] playerFullName]] && ![[NetworkController sharedController] isConnectedToServer])) { ITDebugLog(@"Remote application launched."); playerRunningState = ITMTRemotePlayerRunning; [[self currentRemote] begin];