X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/3a1a21d1ea3e060f88ca1d24ea881f3ccb97640c..5ba3df3581e79b113dcf5eb6346baf246fa49da2:/MainController.m diff --git a/MainController.m b/MainController.m index 523936c..e6d338b 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; } } @@ -528,7 +533,10 @@ static MainController *sharedController; } if ( [df boolForKey:@"showTrackRating"] ) { - rating = ( [currentRemote currentSongRating] * 5 ); + float currentRating = [currentRemote currentSongRating]; + if (currentRating >= 0.0) { + rating = ( currentRating * 5 ); + } } } else {