fix: Yomiroll search page

This commit is contained in:
kodjomoustapha
2024-02-12 11:25:37 +01:00
parent c624e4ebba
commit 043f3c5e15
2 changed files with 7 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import '../../../../model/source.dart'; import '../../../../model/source.dart';
const _yomirollVersion = "0.0.15"; const _yomirollVersion = "0.0.2";
const _yomirollSourceCodeUrl = const _yomirollSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/src/all/yomiroll/yomiroll.dart"; "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/src/all/yomiroll/yomiroll.dart";

View File

@@ -33,11 +33,12 @@ class YomiRoll extends MProvider {
String url = ""; String url = "";
final start = page != 1 ? "start=${(page - 1) * 36}&" : ""; final start = page != 1 ? "start=${(page - 1) * 36}&" : "";
if (query.isNotEmpty) { if (query.isNotEmpty) {
final typeFilter = filters final typeFilter =
.where((e) => e.type == "TypeFilter" ? true : false) filters.where((e) => e.type == "TypeFilter" ? true : false).toList();
.toList() String type = "top_results";
.first; if (typeFilter.isNotEmpty) {
final type = typeFilter.values[typeFilter.state].value; type = typeFilter.first.values[typeFilter.first.state].value;
}
url = url =
"$crApiUrl/discover/search?${start}n=36&q=${query.toLowerCase().replaceAll(" ", "+")}&type=$type"; "$crApiUrl/discover/search?${start}n=36&q=${query.toLowerCase().replaceAll(" ", "+")}&type=$type";
} else { } else {