[Android] Subtitles: try to generate hash for any file://
Geoffrey Métais
git at videolan.org
Fri Apr 27 12:13:10 CEST 2018
vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 27 11:18:13 2018 +0200| [ab9e6f2d8c6429838e0efe1b7c6b76ca8bea67fd] | committer: Geoffrey Métais
Subtitles: try to generate hash for any file://
> https://code.videolan.org/videolan/vlc-android/commit/ab9e6f2d8c6429838e0efe1b7c6b76ca8bea67fd
---
vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
index 7ec543cf4..a8ce6a6b1 100644
--- a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
+++ b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
@@ -363,7 +363,7 @@ public class SubtitlesDownloader {
long fileLength = 0;
final Uri mediaUri = media.getUri();
if (firstPass) {
- if (FileUtils.canWrite(mediaUri)) {
+ if ("file".equals(mediaUri.getScheme())) {
File videoFile = new File(mediaUri.getPath());
hash = FileUtils.computeHash(videoFile);
fileLength = videoFile.length();
More information about the Android
mailing list