date function fix (#745)
This commit is contained in:
@@ -2,6 +2,7 @@ import { CheerioAPI, load as parseHTML } from "cheerio";
|
|||||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||||
import { FilterTypes, Filters } from "@libs/filterInputs";
|
import { FilterTypes, Filters } from "@libs/filterInputs";
|
||||||
import { Plugin } from "@typings/plugin";
|
import { Plugin } from "@typings/plugin";
|
||||||
|
import dayjs from "dayjs";
|
||||||
class Genesis implements Plugin.PluginBase {
|
class Genesis implements Plugin.PluginBase {
|
||||||
id = "genesistls";
|
id = "genesistls";
|
||||||
name = "GenesisTLs";
|
name = "GenesisTLs";
|
||||||
@@ -103,7 +104,9 @@ class Genesis implements Plugin.PluginBase {
|
|||||||
|
|
||||||
chapter.push({
|
chapter.push({
|
||||||
name: chapterName,
|
name: chapterName,
|
||||||
releaseTime: new Date(releaseDate).toISOString(),
|
|
||||||
|
releaseTime: dayjs(releaseDate).toISOString(),
|
||||||
|
|
||||||
url: chapterUrl,
|
url: chapterUrl,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -123,6 +126,7 @@ class Genesis implements Plugin.PluginBase {
|
|||||||
pageNo: number
|
pageNo: number
|
||||||
): Promise<Plugin.NovelItem[]> {
|
): Promise<Plugin.NovelItem[]> {
|
||||||
const url = `${this.site}page/${pageNo}/?s=${searchTerm}`;
|
const url = `${this.site}page/${pageNo}/?s=${searchTerm}`;
|
||||||
|
|
||||||
const result = await fetchApi(url);
|
const result = await fetchApi(url);
|
||||||
const body = await result.text();
|
const body = await result.text();
|
||||||
|
|
||||||
@@ -169,6 +173,7 @@ class Genesis implements Plugin.PluginBase {
|
|||||||
genres: {
|
genres: {
|
||||||
label: "Genres",
|
label: "Genres",
|
||||||
options: [
|
options: [
|
||||||
|
|
||||||
{ label: "Academy", value: "academy" },
|
{ label: "Academy", value: "academy" },
|
||||||
{ label: "Action", value: "action" },
|
{ label: "Action", value: "action" },
|
||||||
{ label: "Adult", value: "adult" },
|
{ label: "Adult", value: "adult" },
|
||||||
|
|||||||
Reference in New Issue
Block a user