(add src) LNMTL & ScribbleHub (#738)

* quick

* quick panda fix

* remove console.log
This commit is contained in:
K1ngfish3r
2024-01-29 23:27:42 +08:00
committed by GitHub
parent 4c7bee5855
commit 38fc1860da
6 changed files with 565 additions and 42 deletions
+6 -34
View File
@@ -9,23 +9,22 @@ class PandaMTL implements Plugin.PluginBase {
icon = "src/en/wordpress/icon.png";
site = "https://pandamtl.com/";
version = "1.0.0";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
let link = `${this.site}series/?page=${pageNo}`;
if (filters.genres.value.length)
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
link += filters.genres.value.map((i) => `&genre[]=${i}`).join("");
if (filters.type.value.length)
link += filters.type.value.map((i) => `&lang[]=${i}`).join("");
link += "&status=" + (filters?.status ? filters.status : "");
link += "&status=" + filters.status.value;
link += "&order=" + filters.order.value;
const headers = new Headers();
const body = await fetchApi(link, { headers }).then((result) =>
@@ -177,18 +176,13 @@ class PandaMTL implements Plugin.PluginBase {
filters = {
order: {
label: "Sort By",
label: "Sort By",
value: "popular",
options: [
{ label: "Default", value: "" },
{ label: "Default", value: "" },
{ label: "A-Z", value: "title" },
{ label: "A-Z", value: "title" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Z-A", value: "titlereverse" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Update", value: "update" },
{ label: "Latest Added", value: "latest" },
{ label: "Latest Added", value: "latest" },
{ label: "Popular", value: "popular" },
],
type: FilterTypes.Picker,
@@ -198,11 +192,8 @@ class PandaMTL implements Plugin.PluginBase {
value: "",
options: [
{ label: "All", value: "" },
{ label: "All", value: "" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Ongoing", value: "ongoing" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Hiatus", value: "hiatus" },
{ label: "Completed", value: "completed" },
],
type: FilterTypes.Picker,
@@ -212,7 +203,6 @@ class PandaMTL implements Plugin.PluginBase {
label: "Type",
options: [
{ label: "Light Novel (KR)", value: "light-novel-kr" },
{ label: "Light Novel (KR)", value: "light-novel-kr" },
{ label: "Web Novel", value: "web-novel" },
],
type: FilterTypes.CheckboxGroup,
@@ -222,41 +212,23 @@ class PandaMTL implements Plugin.PluginBase {
value: [],
options: [
{ label: "Action", value: "action" },
{ label: "Action", value: "action" },
{ label: "Adult", value: "adult" },
{ label: "Adult", value: "adult" },
{ label: "Adventure", value: "adventure" },
{ label: "Adventure", value: "adventure" },
{ label: "Comedy", value: "comedy" },
{ label: "Comedy", value: "comedy" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Ecchi", value: "ecchi" },
{ label: "Fantasy", value: "fantasy" },
{ label: "Fantasy", value: "fantasy" },
{ label: "Harem", value: "harem" },
{ label: "Harem", value: "harem" },
{ label: "Josei", value: "josei" },
{ label: "Josei", value: "josei" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Martial Arts", value: "martial-arts" },
{ label: "Mature", value: "mature" },
{ label: "Mature", value: "mature" },
{ label: "Romance", value: "romance" },
{ label: "Romance", value: "romance" },
{ label: "School Life", value: "school-life" },
{ label: "School Life", value: "school-life" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Sci-fi", value: "sci-fi" },
{ label: "Seinen", value: "seinen" },
{ label: "Seinen", value: "seinen" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Slice of Life", value: "slice-of-life" },
{ label: "Smut", value: "smut" },
{ label: "Smut", value: "smut" },
{ label: "Sports", value: "sports" },
{ label: "Sports", value: "sports" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Supernatural", value: "supernatural" },
{ label: "Tragedy", value: "tragedy" },
],
type: FilterTypes.CheckboxGroup,