feat (lnhako): add support latest (#2519)
This commit is contained in:
@@ -20,7 +20,7 @@ class HakoPlugin implements Plugin.PluginBase {
|
|||||||
name = 'Hako';
|
name = 'Hako';
|
||||||
icon = 'src/vi/hakolightnovel/icon.png';
|
icon = 'src/vi/hakolightnovel/icon.png';
|
||||||
site = 'https://ln.hako.vn';
|
site = 'https://ln.hako.vn';
|
||||||
version = '1.1.1';
|
version = '1.2.0';
|
||||||
parseNovels(url: string) {
|
parseNovels(url: string) {
|
||||||
return fetchApi(url)
|
return fetchApi(url)
|
||||||
.then(res => res.text())
|
.then(res => res.text())
|
||||||
@@ -59,10 +59,15 @@ class HakoPlugin implements Plugin.PluginBase {
|
|||||||
}
|
}
|
||||||
popularNovels(
|
popularNovels(
|
||||||
pageNo: number,
|
pageNo: number,
|
||||||
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>,
|
{
|
||||||
|
showLatestNovels,
|
||||||
|
filters,
|
||||||
|
}: Plugin.PopularNovelsOptions<typeof this.filters>,
|
||||||
): Promise<Plugin.NovelItem[]> {
|
): Promise<Plugin.NovelItem[]> {
|
||||||
let link = this.site + '/danh-sach';
|
let link = this.site + '/danh-sach';
|
||||||
if (filters) {
|
if (showLatestNovels) {
|
||||||
|
link += '?sapxep=capnhat&page=' + pageNo;
|
||||||
|
} else if (filters) {
|
||||||
if (filters.alphabet.value) {
|
if (filters.alphabet.value) {
|
||||||
link += '/' + filters.alphabet.value;
|
link += '/' + filters.alphabet.value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user