[Android] Fix subtitles download parameter type

Geoffrey Métais git at videolan.org
Tue Jun 21 16:02:23 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jun 21 16:02:12 2016 +0200| [9f1c2d8b8e5b0749a491048bd028ec97803fe172] | committer: Geoffrey Métais

Fix subtitles download parameter type

> https://code.videolan.org/videolan/vlc-android/commit/9f1c2d8b8e5b0749a491048bd028ec97803fe172
---

 vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
index e3b0d80..a633ad8 100644
--- a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
+++ b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
@@ -245,10 +245,10 @@ public class SubtitlesDownloader {
                             break;
                         resultMap = (HashMap<String, Object>) subtitleMaps[i];
                         srtFormat = (String) resultMap.get("SubFormat");
-                        Integer queryNumber = (Integer) resultMap.get("QueryNumber");
+                        String queryNumber = (String) resultMap.get("QueryNumber");
                         subLanguageID = (String) resultMap.get("SubLanguageID");
                         subDownloadLink = (String) resultMap.get("SubDownloadLink");
-                        fileUrl = (String) paths[queryNumber.intValue()/languages.size()];
+                        fileUrl = (String) paths[Integer.getInteger(queryNumber, 0).intValue()/languages.size()];
                         if (fileUrl == null) //we keep only result for exact matching name
                             continue;
                         fileName = fileUrl.substring(fileUrl.lastIndexOf('/') + 1);



More information about the Android mailing list