Skip to content

SkyNovels[ES] feat: add filters, pagination and resolve fix search#2136

Merged
rajarsheechatterjee merged 3 commits into
lnreader:masterfrom
jhoendryb:feat-skynovels-update
Apr 22, 2026
Merged

SkyNovels[ES] feat: add filters, pagination and resolve fix search#2136
rajarsheechatterjee merged 3 commits into
lnreader:masterfrom
jhoendryb:feat-skynovels-update

Conversation

@jhoendryb

Copy link
Copy Markdown
Contributor

Feat:

  • Added genre filters support.
  • Implemented pagination
  • Optimized search: Fixed local filtering by implementing API-side search and disabling cache for fresh results

Checklist

  • Update version code if an existing plugin was modified
  • Test changes in Plugin Playground or the app
  • Reference related issues in the PR body (e.g. Closes #xyz)

@K1ngfish3r K1ngfish3r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heres a few nits

): Promise<Plugin.NovelItem[]> {
searchTerm = searchTerm.toLowerCase();
const url = this.apiSite + 'novels?&q';
const url = `${this.apiSite}novels?page=${pageNo}&q=${searchTerm}`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encodeURIcomponent for searchTerm

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

God, I never learn. Okay.

Comment thread plugins/spanish/skynovels.ts Outdated
const url = this.apiSite + 'novels?&q';

const result = await fetchApi(url);
filters: Filters | undefined = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove typing here, since you already wrote satisfies Filters at the end

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, thanks for the advice

pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>,
): Promise<Plugin.NovelItem[]> {
const genres = (filters?.genres?.value as string[]) || [];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only thing probably undefined here is filters.genres.value, but this is also fine

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

Comment thread plugins/spanish/skynovels.ts Outdated
): Promise<Plugin.NovelItem[]> {
const genres = (filters?.genres?.value as string[]) || [];
const order = genres.length > 0 ? 'updated' : 'rating';
const url = `${this.apiSite}novels?page=${pageNo}&order=${order}&genres=${genres.join(',')}`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will &genres= be added even if it's empty?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because having it doesn't cause problems even if it's empty. Do you think I should avoid adding it if it's not necessary?

@K1ngfish3r K1ngfish3r Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should try to replicate website, if website is like this, it ok

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, it's not like that on the website, I'll adjust it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready bro

@K1ngfish3r K1ngfish3r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rajarsheechatterjee
rajarsheechatterjee merged commit a95e325 into lnreader:master Apr 22, 2026
1 check passed
nofzo pushed a commit to nofzo/lnreader-plugins that referenced this pull request May 22, 2026
* SkyNovels[ES] feat: add filters, pagination and resolve fix search

* SkyNovels[ES] Fix: minors correction

* SkyNovels[ES] Fix: minors correction

---------

Co-authored-by: JhoendryB <jhoendryblanco@htmail.com>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants