statusWindowController = [StatusWindowController sharedController];
menuController = [[MenuController alloc] init];
df = [[NSUserDefaults standardUserDefaults] retain];
+ timerUpdating = NO;
}
return self;
}
- (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;
}
}
}
if ( [df boolForKey:@"showTrackRating"] ) {
- rating = ( [currentRemote currentSongRating] * 5 );
+ float currentRating = [currentRemote currentSongRating];
+ if (currentRating >= 0.0) {
+ rating = ( currentRating * 5 );
+ }
}
} else {