X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/3a1a21d1ea3e060f88ca1d24ea881f3ccb97640c..ed343b1325730f0ce536c4ff7ad0549d2af33949:/MainController.m diff --git a/MainController.m b/MainController.m index 523936c..518d86f 100755 --- a/MainController.m +++ b/MainController.m @@ -39,6 +39,7 @@ static MainController *sharedController; statusWindowController = [StatusWindowController sharedController]; menuController = [[MenuController alloc] init]; df = [[NSUserDefaults standardUserDefaults] retain]; + timerUpdating = NO; } return self; } @@ -202,15 +203,19 @@ static MainController *sharedController; - (void)timerUpdate { - if ( [self songChanged] ) { + if ( [self songChanged] && (timerUpdating != YES) ) { ITDebugLog(@"The song changed."); - [self setLatestSongIdentifier:[currentRemote playerStateUniqueIdentifier]]; + timerUpdating = YES; latestPlaylistClass = [currentRemote currentPlaylistClass]; [menuController rebuildSubmenus]; if ( [df boolForKey:@"showSongInfoOnChange"] ) { [self performSelector:@selector(showCurrentTrackInfo) withObject:nil afterDelay:0.0]; } + + [self setLatestSongIdentifier:[currentRemote playerStateUniqueIdentifier]]; + + timerUpdating = NO; } }