[Android] Remove any slash from subtitles download URLs
Geoffrey Métais
git at videolan.org
Thu Jul 12 16:32:01 CEST 2018
vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jul 12 16:27:49 2018 +0200| [cf08becb34dd44bb2b9dfdd73be6c0ea859f1ce2] | committer: Geoffrey Métais
Remove any slash from subtitles download URLs
(cherry picked from commit 02646074a1a3edad65d437db29a0c4ea6b3c0205)
> https://code.videolan.org/videolan/vlc-android/commit/cf08becb34dd44bb2b9dfdd73be6c0ea859f1ce2
---
vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java | 5 ++++-
1 file changed, 4 insertions(+), 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 4a842acfe..04006e902 100644
--- a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
+++ b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
@@ -327,7 +327,10 @@ public class SubtitlesDownloader {
if (mToken == null || path == null) return;
final StringBuilder sb = new StringBuilder();
final String name = fileName.lastIndexOf('.') > 0 ? fileName.substring(0, fileName.lastIndexOf('.')) : fileName;
- sb.append(SUBTITLES_DIRECTORY.getPath()).append('/').append(name.replace("/", "")).append('.').append(language).append('.').append(subFormat);
+ sb.append(SUBTITLES_DIRECTORY.getPath())
+ .append('/').append(name.replace("/", ""))
+ .append('.').append(language.replace("/", ""))
+ .append('.').append(subFormat.replace("/", ""));
final String srtUrl = sb.toString();
FileOutputStream f = null;
GZIPInputStream gzIS = null;
More information about the Android
mailing list