mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-17 04:10:29 +00:00
dart format
This commit is contained in:
@@ -10,9 +10,12 @@ class MMRCMS extends MProvider {
|
||||
|
||||
@override
|
||||
Future<MPages> getPopular(int page) async {
|
||||
final res = (await client.get(Uri.parse(
|
||||
"${source.baseUrl}/filterList?page=$page&sortBy=views&asc=false")))
|
||||
.body;
|
||||
final res =
|
||||
(await client.get(
|
||||
Uri.parse(
|
||||
"${source.baseUrl}/filterList?page=$page&sortBy=views&asc=false",
|
||||
),
|
||||
)).body;
|
||||
|
||||
List<MManga> mangaList = [];
|
||||
final urls = xpath(res, '//*[ @class="chart-title"]/@href');
|
||||
@@ -24,7 +27,8 @@ class MMRCMS extends MProvider {
|
||||
images.add("${source.baseUrl}/uploads/manga/${slug}.jpg");
|
||||
} else {
|
||||
images.add(
|
||||
"${source.baseUrl}/uploads/manga/${slug}/cover/cover_250x350.jpg");
|
||||
"${source.baseUrl}/uploads/manga/${slug}/cover/cover_250x350.jpg",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,9 +45,10 @@ class MMRCMS extends MProvider {
|
||||
|
||||
@override
|
||||
Future<MPages> getLatestUpdates(int page) async {
|
||||
final res = (await client
|
||||
.get(Uri.parse("${source.baseUrl}/latest-release?page=$page")))
|
||||
.body;
|
||||
final res =
|
||||
(await client.get(
|
||||
Uri.parse("${source.baseUrl}/latest-release?page=$page"),
|
||||
)).body;
|
||||
|
||||
List<MManga> mangaList = [];
|
||||
final urls = xpath(res, '//*[@class="manga-item"]/h3/a/@href');
|
||||
@@ -55,7 +60,8 @@ class MMRCMS extends MProvider {
|
||||
images.add("${source.baseUrl}/uploads/manga/${slug}.jpg");
|
||||
} else {
|
||||
images.add(
|
||||
"${source.baseUrl}/uploads/manga/${slug}/cover/cover_250x350.jpg");
|
||||
"${source.baseUrl}/uploads/manga/${slug}/cover/cover_250x350.jpg",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +130,8 @@ class MMRCMS extends MProvider {
|
||||
images.add("${source.baseUrl}/uploads/manga/$data.jpg");
|
||||
} else {
|
||||
images.add(
|
||||
"${source.baseUrl}/uploads/manga/$data/cover/cover_250x350.jpg");
|
||||
"${source.baseUrl}/uploads/manga/$data/cover/cover_250x350.jpg",
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -136,7 +143,8 @@ class MMRCMS extends MProvider {
|
||||
images.add("${source.baseUrl}/uploads/manga/${slug}.jpg");
|
||||
} else {
|
||||
images.add(
|
||||
"${source.baseUrl}/uploads/manga/${slug}/cover/cover_250x350.jpg");
|
||||
"${source.baseUrl}/uploads/manga/${slug}/cover/cover_250x350.jpg",
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,39 +176,52 @@ class MMRCMS extends MProvider {
|
||||
"prace w toku": 0,
|
||||
"ativo": 0,
|
||||
"مستمرة": 0,
|
||||
"em andamento": 0
|
||||
}
|
||||
"em andamento": 0,
|
||||
},
|
||||
];
|
||||
MManga manga = MManga();
|
||||
final res = (await client.get(Uri.parse(url))).body;
|
||||
|
||||
final author = xpath(res,
|
||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Auteur(s)") or contains(text(), "Author(s)") or contains(text(), "Autor(es)") or contains(text(), "Yazar(lar) or contains(text(), "Mangaka(lar)")]//following-sibling::dd[1]/text()');
|
||||
final author = xpath(
|
||||
res,
|
||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Auteur(s)") or contains(text(), "Author(s)") or contains(text(), "Autor(es)") or contains(text(), "Yazar(lar) or contains(text(), "Mangaka(lar)")]//following-sibling::dd[1]/text()',
|
||||
);
|
||||
if (author.isNotEmpty) {
|
||||
manga.author = author.first;
|
||||
}
|
||||
final status = xpath(res,
|
||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Statut") or contains(text(), "Status") or contains(text(), "Estado") or contains(text(), "Durum")]/following-sibling::dd[1]/text()');
|
||||
final status = xpath(
|
||||
res,
|
||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Statut") or contains(text(), "Status") or contains(text(), "Estado") or contains(text(), "Durum")]/following-sibling::dd[1]/text()',
|
||||
);
|
||||
if (status.isNotEmpty) {
|
||||
manga.status = parseStatus(status.first, statusList);
|
||||
}
|
||||
|
||||
final description =
|
||||
xpath(res, '//*[@class="well" or @class="manga well"]/p/text()');
|
||||
final description = xpath(
|
||||
res,
|
||||
'//*[@class="well" or @class="manga well"]/p/text()',
|
||||
);
|
||||
if (description.isNotEmpty) {
|
||||
manga.description = description.first;
|
||||
}
|
||||
|
||||
manga.genre = xpath(res,
|
||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Categories") or contains(text(), "Categorias") or contains(text(), "Categorías") or contains(text(), "Catégories") or contains(text(), "Kategoriler" or contains(text(), "Kategorie") or contains(text(), "Kategori") or contains(text(), "Tagi"))]/following-sibling::dd[1]/text()');
|
||||
manga.genre = xpath(
|
||||
res,
|
||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Categories") or contains(text(), "Categorias") or contains(text(), "Categorías") or contains(text(), "Catégories") or contains(text(), "Kategoriler" or contains(text(), "Kategorie") or contains(text(), "Kategori") or contains(text(), "Tagi"))]/following-sibling::dd[1]/text()',
|
||||
);
|
||||
|
||||
var chapUrls = xpath(res, '//*[@class="chapter-title-rtl"]/a/@href');
|
||||
var chaptersNames = xpath(res, '//*[@class="chapter-title-rtl"]/a/text()');
|
||||
var chaptersDates =
|
||||
xpath(res, '//*[@class="date-chapter-title-rtl"]/text()');
|
||||
var chaptersDates = xpath(
|
||||
res,
|
||||
'//*[@class="date-chapter-title-rtl"]/text()',
|
||||
);
|
||||
|
||||
var dateUploads =
|
||||
parseDates(chaptersDates, source.dateFormat, source.dateFormatLocale);
|
||||
var dateUploads = parseDates(
|
||||
chaptersDates,
|
||||
source.dateFormat,
|
||||
source.dateFormatLocale,
|
||||
);
|
||||
|
||||
List<MChapter>? chaptersList = [];
|
||||
for (var i = 0; i < chaptersNames.length; i++) {
|
||||
@@ -219,8 +240,10 @@ class MMRCMS extends MProvider {
|
||||
final res = (await client.get(Uri.parse(url))).body;
|
||||
|
||||
List<String> pagesUrl = [];
|
||||
final pages =
|
||||
xpath(res, '//*[@id="all"]/img[@class="img-responsive"]/@data-src');
|
||||
final pages = xpath(
|
||||
res,
|
||||
'//*[@id="all"]/img[@class="img-responsive"]/@data-src',
|
||||
);
|
||||
for (var page in pages) {
|
||||
if (page.startsWith('//')) {
|
||||
pagesUrl.add(page.replaceAll('//', 'https://'));
|
||||
@@ -306,7 +329,7 @@ class MMRCMS extends MProvider {
|
||||
SelectFilterOption("Name", "name"),
|
||||
SelectFilterOption("Popularity", "views"),
|
||||
SelectFilterOption("Last update", "last_release"),
|
||||
])
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -13,26 +13,30 @@ const mmrcmsSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/mmrcms.dart";
|
||||
|
||||
List<Source> get mmrcmsSourcesList => _mmrcmsSourcesList;
|
||||
List<Source> _mmrcmsSourcesList = [
|
||||
//Scan VF (FR)
|
||||
scanvfSource,
|
||||
//Komikid (ID)
|
||||
komikidSource,
|
||||
//MangaID (ID)
|
||||
mangaidSource,
|
||||
//Jpmangas (FR)
|
||||
jpmangasSource,
|
||||
//مانجا اون لاين (AR)
|
||||
onmaSource,
|
||||
//Read Comics Online (EN)
|
||||
readcomicsonlineSource,
|
||||
//Lelscan-VF (FR)
|
||||
lelscanvfSource,
|
||||
//Manga-FR (FR)
|
||||
mangafrSource,
|
||||
]
|
||||
.map((e) => e
|
||||
..itemType = ItemType.manga
|
||||
..sourceCodeUrl = mmrcmsSourceCodeUrl
|
||||
..version = mmrcmsVersion)
|
||||
.toList();
|
||||
List<Source> _mmrcmsSourcesList =
|
||||
[
|
||||
//Scan VF (FR)
|
||||
scanvfSource,
|
||||
//Komikid (ID)
|
||||
komikidSource,
|
||||
//MangaID (ID)
|
||||
mangaidSource,
|
||||
//Jpmangas (FR)
|
||||
jpmangasSource,
|
||||
//مانجا اون لاين (AR)
|
||||
onmaSource,
|
||||
//Read Comics Online (EN)
|
||||
readcomicsonlineSource,
|
||||
//Lelscan-VF (FR)
|
||||
lelscanvfSource,
|
||||
//Manga-FR (FR)
|
||||
mangafrSource,
|
||||
]
|
||||
.map(
|
||||
(e) =>
|
||||
e
|
||||
..itemType = ItemType.manga
|
||||
..sourceCodeUrl = mmrcmsSourceCodeUrl
|
||||
..version = mmrcmsVersion,
|
||||
)
|
||||
.toList();
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get jpmangasSource => _jpmangasSource;
|
||||
|
||||
Source _jpmangasSource = Source(
|
||||
name: "Jpmangas",
|
||||
baseUrl: "https://jpmangas.cc",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/jpmangas/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get jpmangasSource => _jpmangasSource;
|
||||
|
||||
Source _jpmangasSource = Source(
|
||||
name: "Jpmangas",
|
||||
baseUrl: "https://jpmangas.cc",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/jpmangas/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get komikidSource => _komikidSource;
|
||||
|
||||
Source _komikidSource = Source(
|
||||
name: "Komikid",
|
||||
baseUrl: "https://www.komikid.com",
|
||||
lang: "id",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/komikid/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get komikidSource => _komikidSource;
|
||||
|
||||
Source _komikidSource = Source(
|
||||
name: "Komikid",
|
||||
baseUrl: "https://www.komikid.com",
|
||||
lang: "id",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/komikid/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get lelscanvfSource => _lelscanvfSource;
|
||||
|
||||
Source _lelscanvfSource = Source(
|
||||
name: "Lelscan-VF",
|
||||
baseUrl: "https://www.lelscanvf.cc/",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/lelscanvf/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get lelscanvfSource => _lelscanvfSource;
|
||||
|
||||
Source _lelscanvfSource = Source(
|
||||
name: "Lelscan-VF",
|
||||
baseUrl: "https://www.lelscanvf.cc/",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/lelscanvf/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get mangafrSource => _mangafrSource;
|
||||
|
||||
Source _mangafrSource = Source(
|
||||
name: "Manga-FR",
|
||||
baseUrl: "https://manga-fr.me",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/mangafr/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get mangafrSource => _mangafrSource;
|
||||
|
||||
Source _mangafrSource = Source(
|
||||
name: "Manga-FR",
|
||||
baseUrl: "https://manga-fr.me",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/mangafr/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get mangaidSource => _mangaidSource;
|
||||
|
||||
Source _mangaidSource = Source(
|
||||
name: "MangaID",
|
||||
baseUrl: "https://mangaid.click",
|
||||
lang: "id",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/mangaid/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get mangaidSource => _mangaidSource;
|
||||
|
||||
Source _mangaidSource = Source(
|
||||
name: "MangaID",
|
||||
baseUrl: "https://mangaid.click",
|
||||
lang: "id",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/mangaid/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get onmaSource => _onmaSource;
|
||||
|
||||
Source _onmaSource = Source(
|
||||
name: "مانجا اون لاين",
|
||||
baseUrl: "https://onma.top",
|
||||
lang: "ar",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/onma/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get onmaSource => _onmaSource;
|
||||
|
||||
Source _onmaSource = Source(
|
||||
name: "مانجا اون لاين",
|
||||
baseUrl: "https://onma.top",
|
||||
lang: "ar",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/onma/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get readcomicsonlineSource => _readcomicsonlineSource;
|
||||
|
||||
Source _readcomicsonlineSource = Source(
|
||||
name: "Read Comics Online",
|
||||
baseUrl: "https://readcomicsonline.ru",
|
||||
lang: "en",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/readcomicsonline/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get readcomicsonlineSource => _readcomicsonlineSource;
|
||||
|
||||
Source _readcomicsonlineSource = Source(
|
||||
name: "Read Comics Online",
|
||||
baseUrl: "https://readcomicsonline.ru",
|
||||
lang: "en",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/readcomicsonline/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import '../../../../../../model/source.dart';
|
||||
|
||||
Source get scanvfSource => _scanvfSource;
|
||||
|
||||
Source _scanvfSource = Source(
|
||||
name: "Scan VF",
|
||||
baseUrl: "https://www.scan-vf.net",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/scanvf/icon.png",
|
||||
dateFormat:"d MMM. yyyy",
|
||||
dateFormatLocale:"en_us",
|
||||
);
|
||||
Source get scanvfSource => _scanvfSource;
|
||||
|
||||
Source _scanvfSource = Source(
|
||||
name: "Scan VF",
|
||||
baseUrl: "https://www.scan-vf.net",
|
||||
lang: "fr",
|
||||
|
||||
typeSource: "mmrcms",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mmrcms/src/scanvf/icon.png",
|
||||
dateFormat: "d MMM. yyyy",
|
||||
dateFormatLocale: "en_us",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user