Sourceforge apk url extraction bugfix

This commit is contained in:
Imran Remtulla
2023-04-15 15:18:32 -04:00
parent 0ec944eae9
commit 9e4ac397d8

View File

@ -31,7 +31,8 @@ class SourceForge extends AppSource {
getVersion(String url) {
try {
var tokens = url.split('/');
return tokens[tokens.length - 2];
var fi = tokens.indexOf('files');
return tokens[tokens[fi + 2] == 'download' ? fi - 1 : fi + 1];
} catch (e) {
return null;
}