X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/03b8705191a7570ac7460b3393a4e8f1f49c908c..316e5f91294f0bbe3537cb7935546baa111ddfdc:/MainController.m diff --git a/MainController.m b/MainController.m index eadc1b6..bf3bda3 100755 --- a/MainController.m +++ b/MainController.m @@ -330,7 +330,7 @@ static MainController *sharedController; 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; @@ -812,9 +812,13 @@ static MainController *sharedController; } if ( [df boolForKey:@"showAlbumArtwork"] ) { + NSSize oldSize, newSize; NS_DURING - art = [[self currentRemote] currentSongAlbumArt]; - art = [[[[NSImage alloc] initWithData:[art TIFFRepresentation]] autorelease] imageScaledSmoothlyToSize:NSMakeSize(110,110)]; + 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