From e9179e957dab8ea4fb263ba994c85ba5c6b58c04 Mon Sep 17 00:00:00 2001 From: Batorian <53831711+Batorian@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:01:25 +0200 Subject: [PATCH] feat: [Novel Bin]: Update Site URL (#1214) --- src/plugins/english/novelbin.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/plugins/english/novelbin.ts b/src/plugins/english/novelbin.ts index 4eb2d64af..381a02610 100644 --- a/src/plugins/english/novelbin.ts +++ b/src/plugins/english/novelbin.ts @@ -7,8 +7,8 @@ class NovelBin implements Plugin.PluginBase { id = 'novelbin'; name = 'Novel Bin'; icon = 'src/en/novelbin/icon.png'; - site = 'https://binnovel.com/'; - version = '1.0.1'; + site = 'https://novelbin.com/'; + version = '1.1.0'; imageRequestInit?: Plugin.ImageRequestInit | undefined = { headers: { 'referrer': this.site, @@ -43,11 +43,15 @@ class NovelBin implements Plugin.PluginBase { async popularNovels( page: number, - { filters }: Plugin.PopularNovelsOptions, + { showLatestNovels, filters }: Plugin.PopularNovelsOptions, ): Promise { let link = this.site; - if (filters.genre.value !== '') link += `gen/${filters.genre.value}`; - else link += `sort/${filters.sort.value}`; + + if (showLatestNovels) link += 'sort/latest'; + else { + if (filters.genre.value !== '') link += `genre/${filters.genre.value}`; + else link += `sort/${filters.sort.value}`; + } if (filters.complete.value) link += `/completed`; @@ -159,7 +163,7 @@ class NovelBin implements Plugin.PluginBase { }, genre: { value: '', - label: 'Genres', + label: "Genres (Cancels out 'Sort by')", options: [ { label: 'None', value: '' }, { label: 'Action', value: 'action' }, @@ -224,8 +228,8 @@ class NovelBin implements Plugin.PluginBase { type: FilterTypes.Picker, }, complete: { - label: 'Show Completed Novels Only', value: false, + label: 'Show Completed Novels Only', type: FilterTypes.Switch, }, } satisfies Filters;