X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/62b8c89476c1fa88ca9f53483dc3941db65f9728..46b610a25dea1e26f1348dac4024d72514130bb3:/iTunesRemote.m?ds=inline diff --git a/iTunesRemote.m b/iTunesRemote.m index bfd8a47..11ba443 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -670,6 +670,15 @@ return temp2; } +- (int)currentSongDuration +{ + SInt32 temp1; + ITDebugLog(@"Getting current song duration."); + temp1 = [ITSendAEWithString(@"'----':obj { form:'prop', want:type('prop'), seld:type('pDur'), from:obj { form:'prop', want:type('prop'), seld:type('pTrk'), from:'null'() } }", 'core', 'getd', &savedPSN) int32Value]; + ITDebugLog(@"Getting current song duration done."); + return temp1; +} + - (NSString *)currentSongRemaining { SInt32 duration, current, final; @@ -705,7 +714,7 @@ { ITDebugLog(@"Getting current song album art."); NSData *data = ([self isPlaying]) ? [ITSendAEWithString(@"'----':obj { form:'prop', want:type('prop'), seld:type('pPCT'), from:obj { form:'indx', want:type('cArt'), seld:long(1), from:obj { form:'prop', want:type('prop'), seld:type('pTrk'), from:'null'() } } }", 'core', 'getd', &savedPSN) data] : nil; - ITDebugLog(@"Getting current song album art done."); + ITDebugLog(@"Getting current song album art done."); if (data) { return [[[NSImage alloc] initWithData:data] autorelease]; } else {