diff --git a/Application/PlaybackController.m b/Application/PlaybackController.m index dd88e6fd7..097b1c23c 100644 --- a/Application/PlaybackController.m +++ b/Application/PlaybackController.m @@ -681,7 +681,7 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) { PlaylistEntry *pe = (PlaylistEntry *)userInfo; if (!pe) pe = [playlistController currentEntry]; [pe setMetadata:info]; - [playlistView refreshCurrentTrack:self]; + [playlistView refreshTrack:pe]; // Delay the action until this function has returned to the audio thread dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{ [self sendMetaData]; diff --git a/Playlist/PlaylistView.h b/Playlist/PlaylistView.h index 635194a2f..e317f43bf 100644 --- a/Playlist/PlaylistView.h +++ b/Playlist/PlaylistView.h @@ -25,5 +25,6 @@ - (IBAction)scrollToCurrentEntry:(id)sender; - (IBAction)refreshCurrentTrack:(id)sender; +- (IBAction)refreshTrack:(id)sender; @end diff --git a/Playlist/PlaylistView.m b/Playlist/PlaylistView.m index b614abc49..7ba0f7fe4 100644 --- a/Playlist/PlaylistView.m +++ b/Playlist/PlaylistView.m @@ -411,8 +411,13 @@ } - (IBAction)refreshCurrentTrack:(id)sender { + [self refreshTrack:[playlistController currentEntry]]; +} + +- (IBAction)refreshTrack:(id)sender { + PlaylistEntry *pe = (PlaylistEntry *)sender; unsigned long columns = [[self tableColumns] count]; - [self reloadDataForRowIndexes:[NSIndexSet indexSetWithIndex:[[playlistController currentEntry] index]] columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; + [self reloadDataForRowIndexes:[NSIndexSet indexSetWithIndex:[pe index]] columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; } #if 0