mirror of
https://github.com/mpv-player/mpv
synced 2025-03-09 15:47:44 +00:00
cocoa: fix dropping of certain urls on the window
the 'path' of an youtube url (youtube.com/watch?v=x) would just be '/watch'. obviously this fails to load.
This commit is contained in:
parent
3bb06155c9
commit
a6035439a9
@ -362,8 +362,13 @@
|
|||||||
options:@{}];
|
options:@{}];
|
||||||
NSMutableArray* ar = [[[NSMutableArray alloc] init] autorelease];
|
NSMutableArray* ar = [[[NSMutableArray alloc] init] autorelease];
|
||||||
for (NSURL* url in pbitems) {
|
for (NSURL* url in pbitems) {
|
||||||
|
if (url.fileURL) {
|
||||||
[ar addObject:[url path]];
|
[ar addObject:[url path]];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
[ar addObject:[url absoluteString]];
|
||||||
|
}
|
||||||
|
}
|
||||||
[self.adapter handleFilesArray:ar];
|
[self.adapter handleFilesArray:ar];
|
||||||
return YES;
|
return YES;
|
||||||
} else if ([[pboard types] containsObject:NSFilenamesPboardType]) {
|
} else if ([[pboard types] containsObject:NSFilenamesPboardType]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user