Comments
-
Greg Hurrell
Ok, I think I've fixed this. Running some tests now to confirm.
-
Greg Hurrell
Seems to work. If you check out my last.fm profile right now you'll see a few repetitions of "214 Sullivan Street" by Fito & Fitipaldis.
Going to continue testing a few edge cases.
-
Greg Hurrell
Looks like some further work is going to be needed on the edge cases. Check out what happens if we submit a track, then pause, then repeat:
17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Received notification from iTunes 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Received notification of non-playing status 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = "Por la boca vive el pez"; WOAudioscrobblerArtist = "Fito y Fitipaldis"; WOAudioscrobblerLength = 134; WOAudioscrobblerTrack = "214 sullivan street"; } 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: This track was not previously submitted for consideration; cancelling timer 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Cancelling previously existing submission timer, if any 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Cancelling previously existing submission timer, if any 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Received notification from iTunes 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Received notification of playing status 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = "Por la boca vive el pez"; WOAudioscrobblerArtist = "Fito y Fitipaldis"; WOAudioscrobblerLength = 134; WOAudioscrobblerTrack = "214 sullivan street"; } 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: This track appears to be a new submission 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Cancelling previously existing submission timer, if any 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Setting up new submission timer (67 seconds) 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Setting up new submission timer (67 seconds) 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: Received notification from iTunes 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: Received notification of playing status 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = "Por la boca vive el pez"; WOAudioscrobblerArtist = "Fito y Fitipaldis"; WOAudioscrobblerLength = 134; WOAudioscrobblerTrack = "214 sullivan street"; } 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing 17/8/2009 14:43:42 Synergy[11856] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 17/8/2009 14:43:42 Synergy[11856] Audioscrobbler: Position does not match (user must have skipped); will not submit to Audioscrobbler
The problem is when we resume playback (see message at 14:42:35, "This track appears to be a new submission"). On submission we've already cleaned up the "current song info", so when we pause/resume it looks like a new track. But then when the repeat kicks in we get an update notification from iTunes and Synergy sees we already have a timer running and matching song info, so does nothing: and when the timer fires and it has to submit it checks the track position to detect if the user has skipped (which would rule out submission), and of course the position doesn't match.
So I wonder if instead of clearing the track info at submission time if we should be handling all of this when receiving the first notification from iTunes. Basically, overwrite the "current song info" regardless whenever "position" is 0 (zero).
-
Greg Hurrell
Ok, have made some more changes; let's test them out.
First time track is played:
2009-08-17 15:41:07.454 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:41:07.454 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:41:07.457 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:41:07.460 Synergy[13923:10b] Audioscrobbler: This track appears to be a new submission 2009-08-17 15:41:07.461 Synergy[13923:10b] Audioscrobbler: Cancelling previously existing submission timer, if any 2009-08-17 15:41:07.465 Synergy[13923:10b] Audioscrobbler: Setting up new submission timer (44 seconds) 2009-08-17 15:41:51.473 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:41:51.484 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
Next time it is played (on repeat mode):
2009-08-17 15:42:36.751 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:42:36.751 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:42:36.753 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:42:36.755 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration but player position is 0, so treating like a new submission 2009-08-17 15:42:36.756 Synergy[13923:10b] Audioscrobbler: Cancelling previously existing submission timer, if any 2009-08-17 15:42:36.757 Synergy[13923:10b] Audioscrobbler: Setting up new submission timer (44 seconds) 2009-08-17 15:43:20.761 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:43:20.784 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
Now pausing after submission, but before track starts repeating again:
2009-08-17 15:43:41.814 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:43:41.816 Synergy[13923:10b] Audioscrobbler: Received notification of non-playing status 2009-08-17 15:43:41.819 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:43:41.828 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration; pausing timer
Resuming:
2009-08-17 15:44:20.284 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:44:20.288 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:44:20.292 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:44:20.328 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing
Track repeats (starts from beginning again):
2009-08-17 15:44:44.741 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:44:44.747 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:44:44.767 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:44:44.769 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration but player position is 0, so treating like a new submission 2009-08-17 15:44:44.769 Synergy[13923:10b] Audioscrobbler: Cancelling previously existing submission timer, if any 2009-08-17 15:44:44.770 Synergy[13923:10b] Audioscrobbler: Setting up new submission timer (44 seconds)
And submission takes place:
2009-08-17 15:45:28.772 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:45:28.787 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
Last thing to test; pausing before submission timer kicks in:
2009-08-17 15:46:22.087 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:46:22.088 Synergy[13923:10b] Audioscrobbler: Received notification of non-playing status 2009-08-17 15:46:22.093 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:46:22.095 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration; pausing timer
And resuming:
2009-08-17 15:46:46.875 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:46:46.884 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:46:46.887 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:46:46.897 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration and we have a paused timer; resuming it
And submission takes place:
2009-08-17 15:47:22.502 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:47:22.519 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
So looks like everything is working perfectly. Will commit this and include it in the next (post-3.5.4a) release.
Will mark this ticket as closed.
-
Greg Hurrell
Status changed:
- From: open
- To: closed
-
anonymous
Wow, you're wonderfully prompt. I'm the one who originally submitted the question. :) Thank you so much. I'll look forward to the next release!
-
Greg Hurrell
Currently testing, will probably cut a 3.5.5a release before the end of the week or early next week.
-
Greg Hurrell
3.5.5a is now out (released a couple of hours ago).
Add a comment
Comments are now closed for this issue.