X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/d9dcd02d15130f2acc79134cf848019218b106c4..d2a384947ca515dfbdc114c326e7ac4667c0397e:/iTunesRemote.m?ds=sidebyside diff --git a/iTunesRemote.m b/iTunesRemote.m index 8386b3c..dbd21fb 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -670,6 +670,24 @@ return temp2; } +- (int)currentSongPlayed +{ + UInt32 final; + ITDebugLog(@"Getting current song played time."); + final = [ITSendAEWithKey('pPos', 'core', 'getd', &savedPSN) int32Value]; + ITDebugLog(@"Getting current song played time done."); + return final; +} + +- (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;