+- (void)showCurrentTrackInfo
+{
+ NSString *trackName = [currentRemote currentSongTitle];
+ if (!statusWindow && [trackName length]) {
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSString *stringToShow = @"";
+
+ if ([defaults boolForKey:@"showName"]) {
+ if ([defaults boolForKey:@"showArtist"]) {
+ NSString *trackArtist = [currentRemote currentSongArtist];
+ trackName = [NSString stringWithFormat:@"%@ - %@", trackArtist, trackName];
+ }
+ stringToShow = [stringToShow stringByAppendingString:trackName];
+ stringToShow = [stringToShow stringByAppendingString:@"\n"];
+ }
+
+ if ([defaults boolForKey:@"showAlbum"]) {
+ NSString *trackAlbum = [currentRemote currentSongAlbum];
+ if ([trackAlbum length]) {
+ stringToShow = [stringToShow stringByAppendingString:trackAlbum];
+ stringToShow = [stringToShow stringByAppendingString:@"\n"];
+ }
+ }
+
+ if ([defaults boolForKey:@"showTime"]) {
+ NSString *trackTime = [currentRemote currentSongLength];
+ if ([trackTime length]) {
+ stringToShow = [NSString stringWithFormat:@"%@Total Time: %@\n", stringToShow, trackTime];
+ }
+ }
+
+ {
+ int trackTimeLeft = [[currentRemote currentSongRemaining] intValue];
+ int minutes = trackTimeLeft / 60, seconds = trackTimeLeft % 60;
+ if (seconds < 10) {
+ stringToShow = [stringToShow stringByAppendingString:
+ [NSString stringWithFormat:@"Time Remaining: %i:0%i", minutes, seconds]];
+ } else {
+ stringToShow = [stringToShow stringByAppendingString:
+ [NSString stringWithFormat:@"Time Remaining: %i:%i", minutes, seconds]];
+ }
+ }
+
+ //
+ //SHOW THE STATUS WINDOW HERE WITH STRING stringToShow
+ //
+
+ /*[statusWindow setText:stringToShow];
+ [NSTimer scheduledTimerWithTimeInterval:3.0
+ target:self
+ selector:@selector(fadeAndCloseStatusWindow)
+ userInfo:nil
+ repeats:NO];*/
+ }
+}
+
+- (void)showUpcomingSongs
+{
+ int curPlaylist = [currentRemote currentPlaylistIndex];
+ if (!statusWindow) {
+ int numSongs = [currentRemote numberOfSongsInPlaylistAtIndex:curPlaylist];
+
+ if (numSongs > 0) {
+ int numSongsInAdvance = [[NSUserDefaults standardUserDefaults] integerForKey:@"SongsInAdvance"];
+ int curTrack = [currentRemote currentSongIndex];
+ int i;
+ NSString *songs = @"";
+
+ for (i = curTrack + 1; i <= curTrack + numSongsInAdvance; i++) {
+ if (i <= numSongs) {
+ NSString *curSong = [currentRemote songTitleAtIndex:i];
+ songs = [songs stringByAppendingString:curSong];
+ songs = [songs stringByAppendingString:@"\n"];
+ }
+ }
+
+ //
+ //SHOW STATUS WINDOW HERE WITH STRING songs
+ //
+
+ /*[statusWindow setText:songs];
+ [NSTimer scheduledTimerWithTimeInterval:3.0
+ target:self
+ selector:@selector(fadeAndCloseStatusWindow)
+ userInfo:nil
+ repeats:NO];*/
+ }
+ }
+}
+
+- (void)fadeAndCloseStatusWindow
+{
+ [statusWindow orderOut:self];
+}
+