mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-23 14:39:30 +02:00
GitHub: Don't infer AppID if many found (#1112)
This commit is contained in:
@@ -117,22 +117,23 @@ class GitHub extends AppSource {
|
|||||||
.decode(body['content'].toString().split('\n').join('')))
|
.decode(body['content'].toString().split('\n').join('')))
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map((e) => e.trim());
|
.map((e) => e.trim());
|
||||||
var appId = trimmedLines
|
var appIds = trimmedLines.where((l) =>
|
||||||
.where((l) =>
|
l.startsWith('applicationId "') ||
|
||||||
l.startsWith('applicationId "') ||
|
l.startsWith('applicationId \''));
|
||||||
l.startsWith('applicationId \''))
|
appIds = appIds.map((appId) => appId
|
||||||
.first;
|
.split(appId.startsWith('applicationId "') ? '"' : '\'')[1]);
|
||||||
appId = appId
|
appIds = appIds.map((appId) {
|
||||||
.split(appId.startsWith('applicationId "') ? '"' : '\'')[1];
|
if (appId.startsWith('\${') && appId.endsWith('}')) {
|
||||||
if (appId.startsWith('\${') && appId.endsWith('}')) {
|
appId = trimmedLines
|
||||||
appId = trimmedLines
|
.where((l) => l.startsWith(
|
||||||
.where((l) => l.startsWith(
|
'def ${appId.substring(2, appId.length - 1)}'))
|
||||||
'def ${appId.substring(2, appId.length - 1)}'))
|
.first;
|
||||||
.first;
|
appId = appId.split(appId.contains('"') ? '"' : '\'')[1];
|
||||||
appId = appId.split(appId.contains('"') ? '"' : '\'')[1];
|
}
|
||||||
}
|
|
||||||
if (appId.isNotEmpty) {
|
|
||||||
return appId;
|
return appId;
|
||||||
|
}).where((appId) => appId.isNotEmpty);
|
||||||
|
if (appIds.length == 1) {
|
||||||
|
return appIds.first;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
LogsProvider().add(
|
LogsProvider().add(
|
||||||
|
Reference in New Issue
Block a user