Comments
-
Greg Hurrell
Ok, so I've done some testing here. I was able to reproduce the problem sporadically. Basically, if I changing the rating via hot keys lots of times, then only some of those times would result in a Growl notification. I'd say I got the notifications only about 25% of the time, regardless of whether or not I had "Attempt to coalesce notifications" set in the preferences.
My suspicion was that iTunes was not sending notifications in all cases (an iTunes bug), so I fired up Synergy Advance under the debugger and got it to log a message to the console every time it received a notification from iTunes.
It turns out that notifications *are* being sent by iTunes every time, so having ruled out a bug in iTunes I started to look more closely at my own code. It seems that Growl notifications are sent 100% of the time when setting the rating from "more than zero" to "zero". In all other cases, including "zero" to "more than zero", notifications are sent only some of the time. The same is true for setting ratings using the Global Menu instead of Hot Keys.
Turns out the problem is in the flow of execution:
1. Press hot key 2. Tell iTunes to change rating 3. Record "lastKnownRating", using the value you just told iTunes 4. Receive notification from iTunes of a track info change 5. Compare current track info with "lastKnownRating"
The problem is that the comparison in step 5 will always return "no change", because the "last known rating" was already updated in step "3".
The solution, then, is to eliminate step "3", or rather, to move it somewhere else in the order:
1. Press hot key 2. Tell iTunes to change rating 3. Receive notification from iTunes of a track info change 4. Compare current track info with "lastKnownRating" 5. Record "lastKnownRating"
In any case, I have made this change and done some testing. The problem is now fixed. Adding the fixed-in-prerelease keyword. To receive notification when the new version comes out including the fix please subscribe to the synergy-advance-announce mailing list.
-
Greg Hurrell
0.4 is now out. Full announcement here:
https://wincent.dev/a/news/archives/2006/05/synergy_advance_8.php
Marking as FIXED/CLOSED.
Add a comment
Comments are now closed for this issue.