fix: Yomiroll search page

This commit is contained in:
kodjomoustapha 2024-02-12 11:25:37 +01:00
parent 6c3e26c2c8
commit c7923011c8
3 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,6 @@
import '../../../../model/source.dart';
const _yomirollVersion = "0.0.15";
const _yomirollVersion = "0.0.2";
const _yomirollSourceCodeUrl =
"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 = "";
final start = page != 1 ? "start=${(page - 1) * 36}&" : "";
if (query.isNotEmpty) {
final typeFilter = filters
.where((e) => e.type == "TypeFilter" ? true : false)
.toList()
.first;
final type = typeFilter.values[typeFilter.state].value;
final typeFilter =
filters.where((e) => e.type == "TypeFilter" ? true : false).toList();
String type = "top_results";
if (typeFilter.isNotEmpty) {
type = typeFilter.first.values[typeFilter.first.state].value;
}
url =
"$crApiUrl/discover/search?${start}n=36&q=${query.toLowerCase().replaceAll(" ", "+")}&type=$type";
} else {

File diff suppressed because one or more lines are too long