Skip to content

Create a Brscans extension#16291

Open
SMCodesP wants to merge 9 commits into
keiyoushi:mainfrom
SMCodesP:brscans-extension
Open

Create a Brscans extension#16291
SMCodesP wants to merge 9 commits into
keiyoushi:mainfrom
SMCodesP:brscans-extension

Conversation

@SMCodesP

Copy link
Copy Markdown
Contributor

Create a extesion for my scanlator
Closes #10010

Checklist:

  • Updated extVersionCode value in build.gradle for individual extensions
  • Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Added the isNsfw = true flag in build.gradle when appropriate
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension
  • This PR is AI-assisted, I have reviewed the changes manually and confirmed they are not slop

@darwin-256

Copy link
Copy Markdown
Contributor

You have to use the recommended icon generator
ic_launcher.zip or just use this

Comment thread src/pt/brscans/build.gradle Outdated
Comment thread src/pt/brscans/src/eu/kanade/tachiyomi/extension/pt/brscans/BRScans.kt Outdated
Comment thread src/pt/brscans/src/eu/kanade/tachiyomi/extension/pt/brscans/BRScans.kt Outdated
SMCodesP and others added 2 commits May 30, 2026 10:23
Comment on lines +87 to +89
override fun latestUpdatesRequest(page: Int): Request = popularMangaRequest(page)

override fun latestUpdatesParse(response: Response): MangasPage = popularMangaParse(response)

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.

Update the methods to throw an UnsupportedOperationException and set supportLatest to false


// =============================== Search ===============================

override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$apiUrl/manhwas/search/?query=${query.trim()}", headers)

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.

Use HttpUrl builder to properly encode the query param

Comment on lines +114 to +116
return dto.toSManga(genreMap).apply {
initialized = true
}

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.

initialized is used to indicate that the details have already been set during the popular/latest/search parsing methods

Suggested change
return dto.toSManga(genreMap).apply {
initialized = true
}
return dto.toSManga(genreMap)


// =========================== Manga Details ============================

override fun mangaDetailsRequest(manga: SManga): Request = GET("$apiUrl/manhwas/${manga.url}/", headers)

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.

Override the getMangaUrl and getChapterUrl methods so that the "Open in WebView" feature works correctly

@Synchronized
private fun fetchGenreMap() {
if (genreMapFetched) return
try {

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.

also add a fetchFailed bool so genres are not fetched multiple times on failure

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.

Source request: BRScans (Português – PT‑BR)

5 participants