+ ITDebugLog(@"Setting volume to %f", volume);
+ [[self currentRemote] setVolume:volume];
+
+ // Show volume status window
+ [statusWindowController showVolumeWindowWithLevel:dispVol];
+ NS_HANDLER
+ [self networkError:localException];
+ NS_ENDHANDLER
+}
+
+- (void)decrementVolume
+{
+ NS_DURING
+ float volume = [[self currentRemote] volume];
+ float dispVol = volume;
+ ITDebugLog(@"Decrementing volume.");
+ volume -= 0.090;
+ dispVol -= 0.100;
+
+ if (volume < 0.0) {
+ volume = 0.0;
+ dispVol = 0.0;
+ }
+
+ ITDebugLog(@"Setting volume to %f", volume);
+ [[self currentRemote] setVolume:volume];
+
+ //Show volume status window
+ [statusWindowController showVolumeWindowWithLevel:dispVol];
+ NS_HANDLER
+ [self networkError:localException];
+ NS_ENDHANDLER
+}
+
+- (void)incrementRating
+{
+ NS_DURING
+ float rating = [[self currentRemote] currentSongRating];
+ ITDebugLog(@"Incrementing rating.");
+
+ if ([[self currentRemote] currentPlaylistIndex] == 0) {
+ ITDebugLog(@"No song playing, rating change aborted.");
+ return;
+ }
+
+ rating += 0.2;
+ if (rating > 1.0) {
+ rating = 1.0;
+ }
+ ITDebugLog(@"Setting rating to %f", rating);
+ [[self currentRemote] setCurrentSongRating:rating];
+
+ //Show rating status window
+ [statusWindowController showRatingWindowWithRating:rating];
+ NS_HANDLER
+ [self networkError:localException];
+ NS_ENDHANDLER
+}