Skip to content
Snippets Groups Projects
Commit 02646074 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Remove any slash from subtitles download URLs

parent 39f6172b
No related branches found
No related tags found
No related merge requests found
......@@ -324,7 +324,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment