Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e3748920
Commit
e3748920
authored
Nov 24, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix subtitles opening for the applescript bindings
parent
2604049f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
modules/gui/macosx/applescript.m
modules/gui/macosx/applescript.m
+23
-3
No files found.
modules/gui/macosx/applescript.m
View file @
e3748920
...
...
@@ -29,6 +29,7 @@
#import "applescript.h"
#import "CoreInteraction.h"
#import "playlist.h"
#import <vlc_url.h>
/*****************************************************************************
* VLGetURLScriptCommand implementation
...
...
@@ -46,12 +47,31 @@
if
(
o_url
!=
nil
)
[[
NSDocumentController
sharedDocumentController
]
noteNewRecentDocumentURL
:
o_url
];
NSArray
*
o_result
=
[
NSArray
arrayWithObject
:[
NSDictionary
dictionaryWithObject
:
o_urlString
forKey
:
@"ITEM_URL"
]];
input_thread_t
*
p_input
=
pl_CurrentInput
(
VLCIntf
);
BOOL
b_returned
=
NO
;
if
(
p_input
)
{
b_returned
=
input_AddSubtitle
(
p_input
,
[
o_urlString
UTF8String
],
true
);
vlc_object_release
(
p_input
);
if
(
!
b_returned
)
return
nil
;
}
char
*
psz_uri
=
vlc_path2uri
([
o_urlString
UTF8String
],
NULL
);
if
(
!
psz_uri
)
return
nil
;
NSDictionary
*
o_dic
;
NSArray
*
o_array
;
o_dic
=
[
NSDictionary
dictionaryWithObject
:[
NSString
stringWithCString
:
psz_uri
encoding
:
NSUTF8StringEncoding
]
forKey
:
@"ITEM_URL"
];
free
(
psz_uri
);
o_array
=
[
NSArray
arrayWithObject
:
o_dic
];
if
(
b_autoplay
)
[[[
VLCMain
sharedInstance
]
playlist
]
appendArray
:
o_
result
atPos
:
-
1
enqueue
:
NO
];
[[[
VLCMain
sharedInstance
]
playlist
]
appendArray
:
o_
array
atPos
:
-
1
enqueue
:
NO
];
else
[[[
VLCMain
sharedInstance
]
playlist
]
appendArray
:
o_
result
atPos
:
-
1
enqueue
:
YES
];
[[[
VLCMain
sharedInstance
]
playlist
]
appendArray
:
o_
array
atPos
:
-
1
enqueue
:
YES
];
}
}
return
nil
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment