mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 02:41:39 +00:00
fix
This commit is contained in:
@@ -56,18 +56,19 @@ List<Source> _searchJsSources(Directory dir) {
|
|||||||
if (match != null) {
|
if (match != null) {
|
||||||
for (var sourceJson in jsonDecode(match.group(1)!) as List) {
|
for (var sourceJson in jsonDecode(match.group(1)!) as List) {
|
||||||
final langs = sourceJson["langs"] as List?;
|
final langs = sourceJson["langs"] as List?;
|
||||||
final source = Source.fromJson(sourceJson)
|
Source source = Source.fromJson(sourceJson)
|
||||||
..id = int.tryParse("${sourceJson["id"]}")
|
|
||||||
..sourceCodeLanguage = 1
|
..sourceCodeLanguage = 1
|
||||||
..appMinVerReq = defaultSource.appMinVerReq
|
..appMinVerReq = defaultSource.appMinVerReq
|
||||||
..sourceCodeUrl =
|
..sourceCodeUrl =
|
||||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/javascript/${sourceJson["pkgPath"] ?? sourceJson["pkgName"]}";
|
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/javascript/${sourceJson["pkgPath"] ?? sourceJson["pkgName"]}";
|
||||||
|
if (sourceJson["id"] != null) {
|
||||||
|
source = source..id = int.tryParse("${sourceJson["id"]}");
|
||||||
|
}
|
||||||
if (langs?.isNotEmpty ?? false) {
|
if (langs?.isNotEmpty ?? false) {
|
||||||
for (var lang in langs!) {
|
for (var lang in langs!) {
|
||||||
sourceList.add(Source.fromJson(source.toJson())
|
sourceList.add(Source.fromJson(source.toJson())
|
||||||
..lang = lang
|
..lang = lang
|
||||||
..id = source.id ??
|
..id = 'mangayomi-js-"$lang"."${source.name}"'.hashCode);
|
||||||
'mangayomi-js-"$lang"."${source.name}"'.hashCode);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sourceList.add(source);
|
sourceList.add(source);
|
||||||
|
|||||||
Reference in New Issue
Block a user