[Android] Subtitles: try to generate hash for any file://

Geoffrey Métais git at videolan.org
Fri Apr 27 14:55:13 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 27 11:18:13 2018 +0200| [901f41e4b70b5765fce35736e438d33c33b0e916] | committer: Geoffrey Métais

Subtitles: try to generate hash for any file://

> https://code.videolan.org/videolan/vlc-android/commit/901f41e4b70b5765fce35736e438d33c33b0e916
---

 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 18cdf6eac..dfda01fc7 100644
--- a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
+++ b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
@@ -360,7 +360,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