X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/aeae287077a886690921baaea0a0f1149bc891db..b69eee35badf2aaca494fe27250fcd3f5f077cbb:/MainController.m diff --git a/MainController.m b/MainController.m index 3c1cb6c..2b3a7fb 100755 --- a/MainController.m +++ b/MainController.m @@ -290,9 +290,6 @@ static MainController *sharedController; { if ([networkController isConnectedToServer]) { [statusItem setMenu:[menuController menu]]; - if ([[networkController networkObject] remote] == nil) { - [self networkError:nil]; - } } if ( [self songChanged] && (timerUpdating != YES) ) { @@ -409,7 +406,7 @@ static MainController *sharedController; { ITDebugLog(@"Selecting playlist %i", index); NS_DURING - [[self currentRemote] switchToPlaylistAtIndex:index]; + [[self currentRemote] switchToPlaylistAtIndex:(index % 1000) ofSourceAtIndex:(index / 1000)]; NS_HANDLER [self networkError:localException]; NS_ENDHANDLER @@ -502,6 +499,10 @@ static MainController *sharedController; - (ITMTRemote *)currentRemote { + if ([networkController isConnectedToServer] && ![[networkController networkObject] isValid]) { + [self networkError:nil]; + return nil; + } return currentRemote; }