[Playlist Metadata] Apply metadata correctly
Apply dynamic metadata update refreshes to the correct track index. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
ab32365c45
commit
c7cd9b6daf
|
@ -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];
|
||||
|
|
|
@ -25,5 +25,6 @@
|
|||
- (IBAction)scrollToCurrentEntry:(id)sender;
|
||||
|
||||
- (IBAction)refreshCurrentTrack:(id)sender;
|
||||
- (IBAction)refreshTrack:(id)sender;
|
||||
|
||||
@end
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue