[Playlist Pasteboard] Rewrite row pasteboard

Playlist View pasteboard copier function should only be generating URLs,
and it should verify that the entry has a valid URL to begin with.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2022-07-16 06:07:53 -07:00
parent 7f4459c41c
commit 5280cd3aa3
1 changed files with 3 additions and 3 deletions

View File

@ -717,11 +717,11 @@ static void *playlistControllerContext = &playlistControllerContext;
item = [[NSPasteboardItem alloc] init]; item = [[NSPasteboardItem alloc] init];
} }
NSMutableArray *filenames = [NSMutableArray array];
PlaylistEntry *song = [[self arrangedObjects] objectAtIndex:row]; PlaylistEntry *song = [[self arrangedObjects] objectAtIndex:row];
[filenames addObject:[[song path] stringByExpandingTildeInPath]];
if(song.url != nil) {
[item setData:[song.url dataRepresentation] forType:NSPasteboardTypeFileURL]; [item setData:[song.url dataRepresentation] forType:NSPasteboardTypeFileURL];
}
return item; return item;
} }