if ( [self songChanged] && (timerUpdating != YES) && (playerRunningState == ITMTRemotePlayerRunning) ) {
ITDebugLog(@"The song changed.");
- if ([df boolForKey:@"runScripts"] && [[self currentRemote] currentSongTitle]) {
+ if ([df boolForKey:@"runScripts"]) {
NSArray *scripts = [[NSFileManager defaultManager] directoryContentsAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/MenuTunes/Scripts"]];
NSEnumerator *scriptsEnum = [scripts objectEnumerator];
NSString *nextScript;
}
if ( [df boolForKey:@"showAlbumArtwork"] ) {
+ NSSize oldSize, newSize;
NS_DURING
- art = [[self currentRemote] currentSongAlbumArt];
+ art = [[self currentRemote] currentSongAlbumArt];
+ oldSize = [art size];
+ if (oldSize.width > oldSize.height) newSize = NSMakeSize(110,oldSize.height * (110.0f / oldSize.width));
+ else newSize = NSMakeSize(oldSize.width * (110.0f / oldSize.height),110);
+ art = [[[[NSImage alloc] initWithData:[art TIFFRepresentation]] autorelease] imageScaledSmoothlyToSize:newSize];
NS_HANDLER
[self networkError:localException];
NS_ENDHANDLER
time:time
track:track
rating:rating
- image:[[[[NSImage alloc] initWithData:[art TIFFRepresentation]] autorelease] imageScaledSmoothlyToSize:NSMakeSize(110,110)]];
+ image:art];
}
- (void)showUpcomingSongs