Fix(template): lightnovelwp search (#950)
* update template * increment template version
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "kolnovel",
|
"id": "kolnovel",
|
||||||
"sourceSite": "https://kolnovel.club",
|
"sourceSite": "https://kolnovel.club/",
|
||||||
"sourceName": "ملوك الروايات",
|
"sourceName": "ملوك الروايات",
|
||||||
"options": {
|
"options": {
|
||||||
"lang": "Arabic",
|
"lang": "Arabic",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
|||||||
this.icon = `multisrc/lightnovelwp/${metadata.id.toLowerCase()}/icon.png`;
|
this.icon = `multisrc/lightnovelwp/${metadata.id.toLowerCase()}/icon.png`;
|
||||||
this.site = metadata.sourceSite;
|
this.site = metadata.sourceSite;
|
||||||
const versionIncrements = metadata.options?.versionIncrements || 0;
|
const versionIncrements = metadata.options?.versionIncrements || 0;
|
||||||
this.version = `1.0.${4 + versionIncrements}`;
|
this.version = `1.0.${5 + versionIncrements}`;
|
||||||
this.options = metadata.options ?? ({} as LightNovelWPOptions);
|
this.options = metadata.options ?? ({} as LightNovelWPOptions);
|
||||||
this.filters = metadata.filters satisfies Filters;
|
this.filters = metadata.filters satisfies Filters;
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
|||||||
showLatestNovels,
|
showLatestNovels,
|
||||||
}: Plugin.PopularNovelsOptions<typeof this.filters>,
|
}: Plugin.PopularNovelsOptions<typeof this.filters>,
|
||||||
): Promise<Plugin.NovelItem[]> {
|
): Promise<Plugin.NovelItem[]> {
|
||||||
const seriesPath = this.options?.seriesPath ?? '/series/';
|
const seriesPath = this.options?.seriesPath ?? 'series/';
|
||||||
let url = this.site + seriesPath + '?page=' + pageNo;
|
let url = this.site + seriesPath + '?page=' + pageNo;
|
||||||
if (!filters) filters = {};
|
if (!filters) filters = {};
|
||||||
if (showLatestNovels) url += '&order=latest';
|
if (showLatestNovels) url += '&order=latest';
|
||||||
|
|||||||
Reference in New Issue
Block a user