Mangabaka support#3464
Merged
lolamtisch merged 53 commits intomasterfrom Mar 2, 2026
Merged
Conversation
jippi
reviewed
Dec 8, 2025
jippi
reviewed
Dec 8, 2025
jippi
reviewed
Dec 8, 2025
Comment on lines
+217
to
+229
| if (data.genres_v2 && data.genres_v2.length) { | ||
| const gen: any[] = []; | ||
| data.genres_v2.forEach(i => { | ||
| gen.push({ | ||
| text: i.name, | ||
| url: `https://mangabaka.org/search?genre=${i.name}`, | ||
| }); | ||
| }); | ||
| this.meta.info.push({ | ||
| title: api.storage.lang('overview_sidebar_Genres'), | ||
| body: gen, | ||
| }); | ||
| } |
Contributor
There was a problem hiding this comment.
this is likely to change before v2 switch over to be the primary, the URL part at least - it should use the ID at least in the URL instead of name
jippi
reviewed
Dec 8, 2025
jippi
reviewed
Dec 8, 2025
| this.ids.baka = Number(utils.urlPart(url, 3)); | ||
| return; | ||
| } | ||
| if (url.match(/anilist\.co\/(anime|manga)\/\d*/i)) { |
Contributor
There was a problem hiding this comment.
Could probably do this instead and avoid the type check later in the if?
Suggested change
| if (url.match(/anilist\.co\/(anime|manga)\/\d*/i)) { | |
| if (url.match(/anilist\.co\/manga\/\d*/i)) { |
jippi
reviewed
Dec 8, 2025
jippi
reviewed
Dec 8, 2025
jippi
reviewed
Dec 11, 2025
jippi
reviewed
Dec 11, 2025
| } | ||
|
|
||
| // Userinfo call | ||
| if (res && typeof res.error !== 'undefined') { |
Contributor
There was a problem hiding this comment.
any bad/invalid/missing auth error should come with 401 response code, so wouldn't the switch above handle that?
jippi
reviewed
Dec 11, 2025
jippi
reviewed
Dec 11, 2025
jippi
reviewed
Dec 13, 2025
| name: 'after-links'; | ||
| series: BakaSeries; | ||
| list_config: any; | ||
| user: any; |
Contributor
There was a problem hiding this comment.
At time of writing, this is how these types are defined - subject to change at any time - but might be useful
export const OauthScope = z.enum([
// My Library
'library.read',
'library.write',
// MangaBaka moderator role
'mod',
// Basic (required) OIDC scopes
'openid',
'profile',
])
export const AuthIdentify = z.object({
// Required fields
id: z.string(),
// "Profile" fields
nickname: z.string().trim().nullish(),
preferred_username: z.string().trim().nullish(),
updated_at: z.coerce.date(),
role: z.enum(['user', 'developer', 'moderator', 'admin']),
// Informational
auth_type: AuthMethod,
scopes: z.array(OauthScope),
client: z
.object({
name: z.string().trim(),
icon: z.string().trim().nullable(),
type: z.enum(['web', 'native', 'user-agent-based', 'public']),
})
.nullable(),
})
export const ListConfiguration = z.object({
mode: ListMode,
title_romanized: BooleanDefaultFalse,
title_native: BooleanDefaultFalse,
publishers: BooleanDefaultTrue,
staff: BooleanDefaultTrue,
anime: BooleanDefaultFalse,
description: BooleanDefaultFalse,
show_headline: BooleanDefaultTrue,
multi_column: BooleanDefaultTrue,
max_picture_dpi: z.coerce.number().min(1).max(3).default(2),
mb_meta: BooleanDefaultTrue,
source_al: BooleanDefaultTrue,
source_ann: BooleanDefaultTrue,
source_ap: BooleanDefaultTrue,
source_kt: BooleanDefaultTrue,
source_mal: BooleanDefaultTrue,
source_md: BooleanDefaultTrue,
source_mu: BooleanDefaultTrue,
source_shikimori: BooleanDefaultTrue,
// --------------------
// internal
// --------------------
// Apply a line clamp of 1 to title or
title_only_one_line: BooleanDefaultFalse,
// Show or hide all rating options
show_ratings: BooleanDefaultTrue,
// Hide all titles
show_titles: BooleanDefaultTrue,
// Hide all meta (except for volume + chapter)
show_meta: BooleanDefaultTrue,
})
Contributor
|
@lolamtisch from Discord (https://discord.com/channels/@me/1358450902465511514/1456396609154978004) to implement |
Contributor
f8fd88b to
c3ccf51
Compare
Co-authored-by: Christian Winther <jippignu@gmail.com>
This reverts commit e81faf9.
28cc807 to
1f36bd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.