Skip to content

feat: add en.scansgg#531

Open
Olaaris wants to merge 1 commit into
Aidoku-Community:mainfrom
Olaaris:feat/en-scansgg-477
Open

feat: add en.scansgg#531
Olaaris wants to merge 1 commit into
Aidoku-Community:mainfrom
Olaaris:feat/en-scansgg-477

Conversation

@Olaaris

@Olaaris Olaaris commented May 23, 2026

Copy link
Copy Markdown
Contributor

Hello ! First full source so be gentle :D
Let me know if I need to change anything, I've tested through a locally hosted source list and things look good.

Related to #477

Summary

  • Add a new English Scans.GG Aidoku source
  • Implement home sections, search, dynamic filters, series details, chapters, pages, image referers, and deep links
  • Resolve genre tags and scanlator names from Scans.GG API metadata

Validation

  • cargo fmt --check
  • cargo clippy
  • aidoku package

@Olaaris Olaaris force-pushed the feat/en-scansgg-477 branch from 72ec0eb to 76a4b05 Compare May 23, 2026 01:04
@Olaaris Olaaris marked this pull request as ready for review May 23, 2026 01:08
@Olaaris Olaaris changed the title Add Scans.GG source feat(en.scansgg): add source May 23, 2026
@Olaaris Olaaris force-pushed the feat/en-scansgg-477 branch from 76a4b05 to aba983e Compare May 23, 2026 01:25
@Olaaris Olaaris force-pushed the feat/en-scansgg-477 branch from aba983e to 429f84c Compare May 23, 2026 01:44
@kkantan kkantan linked an issue May 23, 2026 that may be closed by this pull request

@kkantan kkantan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good overall, just left a few refactoring suggestions.

{
"info": {
"id": "en.scansgg",
"name": "Scans.GG",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the website title uses lowercase for the gg, so that might be more accurate.

Suggested change
"name": "Scans.GG",
"name": "Scans.gg",

"name": "Scans.GG",
"version": 1,
"url": "https://scans.gg",
"contentRating": 0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

given that there is a "Hentai" genre and such, this should be marked as containing nsfw content.

Suggested change
"contentRating": 0,
"contentRating": 1,

Comment on lines +20 to +23
#[derive(Deserialize)]
struct Response<T> {
data: T,
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it would be better to put all the struct definitions in a models.rs folder, to be consistent with other sources.

Comment on lines +117 to +119
fn cover_url(cover: Option<&str>) -> Option<String> {
cover.map(|cover| format!("{CDN_URL}/covers/{cover}"))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these extra functions could go in a helpers.rs file.

}
}

fn manga(&self, tag_list: Option<&[Tag]>) -> Manga {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we consume self for these two functions? this would allow us to avoid cloning everything.

Suggested change
fn manga(&self, tag_list: Option<&[Tag]>) -> Manga {
fn manga(self, tag_list: Option<&[Tag]>) -> Manga {

Comment on lines +338 to +339
let mut response = Request::get(format!("{API_URL}/series?{qs}"))?.send()?;
let data = response.get_json::<Response<Vec<Series>>>()?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there's a shorthand function you could use here, but it does the same thing so it doesn't really matter.

Suggested change
let mut response = Request::get(format!("{API_URL}/series?{qs}"))?.send()?;
let data = response.get_json::<Response<Vec<Series>>>()?;
let data = Request::get(format!("{API_URL}/series?{qs}"))?
.json_owned::<Response<Vec<Series>>>()?;

let data = response.get_json::<Response<Series>>()?;
let tag_list = fetch_tags().ok();
manga.copy_from(data.data.manga(tag_list.as_deref()));
send_partial_result(&manga);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

usually we put this in an if branch, though I'm not sure if it really matters.

Suggested change
send_partial_result(&manga);
if needs_chapters {
send_partial_result(&manga);
}

Comment on lines +436 to +441
push_scroller(
&mut components,
"Popular Last 3 Months",
popular.three_months,
);
push_scroller(&mut components, "Popular Last 6 Months", popular.six_months);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure how worthwhile it is having these, since they're identical to the one year scroller.

}

push_scroller(&mut components, "Latest Updates", data.data.latest_updates);
push_scroller(&mut components, "Series", data.data.series);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this looks like the same data as the site lists under "New Series", so that might be a better title.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there any chance the padding could be increased a bit around the icon? it seems a little close to the edge, especially compared to the icon shown in the top left corner on the website.

@kkantan kkantan changed the title feat(en.scansgg): add source feat: add en.scansgg May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scans.gg

2 participants