Skip to content

Mangabaka support#3464

Merged
lolamtisch merged 53 commits intomasterfrom
mangabaka
Mar 2, 2026
Merged

Mangabaka support#3464
lolamtisch merged 53 commits intomasterfrom
mangabaka

Conversation

@lolamtisch
Copy link
Copy Markdown
Member

No description provided.

Comment thread src/_provider/MangaBaka/helper.ts
Comment thread src/_provider/MangaBaka/list.ts Outdated
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,
});
}
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 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

Comment thread src/_provider/MangaBaka/search.ts Outdated
this.ids.baka = Number(utils.urlPart(url, 3));
return;
}
if (url.match(/anilist\.co\/(anime|manga)\/\d*/i)) {
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.

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)) {

Comment thread src/_provider/MangaBaka/single.ts Outdated
Comment thread src/_provider/MangaBaka/types.ts
Comment thread src/_provider/MangaBaka/helper.ts
}

// Userinfo call
if (res && typeof res.error !== 'undefined') {
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.

any bad/invalid/missing auth error should come with 401 response code, so wouldn't the switch above handle that?

Comment thread src/_provider/MangaBaka/helper.ts
Comment thread src/_provider/MangaBaka/list.ts Outdated
name: 'after-links';
series: BakaSeries;
list_config: any;
user: any;
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.

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,
})

@jippi
Copy link
Copy Markdown
Contributor

jippi commented Jan 1, 2026

@lolamtisch
Copy link
Copy Markdown
Member Author

@jippi
Copy link
Copy Markdown
Contributor

jippi commented Jan 4, 2026

@lolamtisch lolamtisch force-pushed the mangabaka branch 2 times, most recently from f8fd88b to c3ccf51 Compare February 24, 2026 13:36
@lolamtisch lolamtisch marked this pull request as ready for review February 26, 2026 14:38
Copilot AI review requested due to automatic review settings February 26, 2026 14:38

This comment was marked as spam.

@lolamtisch lolamtisch merged commit a428a27 into master Mar 2, 2026
4 of 8 checks passed
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.

3 participants