Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
ad1384be
Commit
ad1384be
authored
May 31, 2016
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save picked subtitle as a slave for current media
parent
ed01335b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
...d/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+10
-5
No files found.
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
View file @
ad1384be
...
...
@@ -933,15 +933,20 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
final
Intent
data
)
{
if
(
data
==
null
)
return
;
if
(
data
.
getData
()
==
null
)
Log
.
d
(
TAG
,
"Subtitle selection dialog was cancelled"
);
String
subtitlesPath
=
data
.
getData
().
getPath
();
mSubtitleSelectedFiles
.
add
(
subtitlesPath
);
mService
.
addSubtitleTrack
(
subtitlesPath
);
else
{
mService
.
addSubtitleTrack
(
data
.
getData
());
VLCApplication
.
runBackground
(
new
Runnable
()
{
@Override
public
void
run
()
{
MediaDatabase
.
getInstance
().
saveSlave
(
mService
.
getCurrentMediaLocation
(),
Media
.
Slave
.
Type
.
Subtitle
,
2
,
data
.
getDataString
());
}
});
}
}
public
static
void
start
(
Context
context
,
Uri
uri
)
{
...
...
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