1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:42:17 +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:
Akemi 2016-12-13 21:37:05 +01:00
parent 3bb06155c9
commit a6035439a9

View File

@ -362,7 +362,12 @@
options:@{}];
NSMutableArray* ar = [[[NSMutableArray alloc] init] autorelease];
for (NSURL* url in pbitems) {
[ar addObject:[url path]];
if (url.fileURL) {
[ar addObject:[url path]];
}
else {
[ar addObject:[url absoluteString]];
}
}
[self.adapter handleFilesArray:ar];
return YES;