[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>
xcode15
Christopher Snowhill 2022-07-16 06:07:53 -07:00
parent 7bf1bd85b8
commit 8bd37943aa
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]];
[item setData:[song.url dataRepresentation] forType:NSPasteboardTypeFileURL]; if(song.url != nil) {
[item setData:[song.url dataRepresentation] forType:NSPasteboardTypeFileURL];
}
return item; return item;
} }