X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/34a2a6ce5cce484c5b8dcd413efa1181130fbab0..780eb8412d27bba1eaaf0a03ab74f90c62f28253:/MainController.m diff --git a/MainController.m b/MainController.m index 8a6144e..4cfd11c 100755 --- a/MainController.m +++ b/MainController.m @@ -631,12 +631,11 @@ static MainController *sharedController; { ITDebugLog(@"Audioscrobbler: Attempting to submit current track"); [timer invalidate]; - if ([df boolForKey:@"audioscrobblerEnabled"] && [[AudioscrobblerController sharedController] handshakeCompleted]) { + if ([df boolForKey:@"audioscrobblerEnabled"]) { NS_DURING int elapsed = [[self currentRemote] currentSongPlayed], length = [[self currentRemote] currentSongDuration], requiredInterval = ((length / 2 < 240) ? length / 2 : 240); if ((abs(elapsed - requiredInterval) < 5) && ([[self currentRemote] playerPlayingState] == ITMTRemotePlayerPlaying)) { NSString *title = [[self currentRemote] currentSongTitle], *artist = [[self currentRemote] currentSongArtist]; - NSLog(@"Audioscrobbler: Submitting"); if (title && artist) { ITDebugLog(@"Audioscrobbler: Submitting current track"); [[AudioscrobblerController sharedController] submitTrack:title @@ -647,12 +646,9 @@ static MainController *sharedController; } else if (requiredInterval - elapsed > 0) { _audioscrobblerInterval = requiredInterval - elapsed; [_audioscrobblerTimer release]; - NSLog(@"Audioscrobbler: Creating a new timer that will run in %i seconds", _audioscrobblerInterval); ITDebugLog(@"Audioscrobbler: Creating a new timer that will run in %i seconds", _audioscrobblerInterval); _audioscrobblerTimer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:_audioscrobblerInterval] interval:1.0 target:self selector:@selector(submitAudioscrobblerTrack:) userInfo:nil repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:_audioscrobblerTimer forMode:NSDefaultRunLoopMode]; - } else { - NSLog(@"Audioscrobbler: Skipping submission. %i, %i", requiredInterval, elapsed); } NS_HANDLER [self networkError:localException];