Add "auto webtoon mode" option to reader

This commit is contained in:
schroda
2024-12-26 17:15:50 +01:00
parent cfd5b78488
commit 33e184ba18
13 changed files with 184 additions and 24 deletions

View File

@@ -8,7 +8,7 @@
import { MangaStatus } from '@/lib/graphql/generated/graphql.ts';
import { TranslationKey } from '@/Base.types.ts';
import { MangaAction, MangaIdInfo } from '@/modules/manga/Manga.types.ts';
import { MangaAction, MangaIdInfo, MangaType } from '@/modules/manga/Manga.types.ts';
export const FALLBACK_MANGA: MangaIdInfo = { id: -1 };
@@ -101,3 +101,46 @@ export const actionToTranslationKey: {
error: 'manga.action.track.add.label.error',
},
};
export const SOURCES_BY_MANGA_TYPE: Record<MangaType, string[]> = {
[MangaType.MANGA]: [],
[MangaType.COMIC]: [],
[MangaType.WEBTOON]: ['mangatoon', 'manmanga', 'toomics', 'webcomics', 'webtoons', 'webtoon'],
[MangaType.MANHWA]: [
'hiperdex',
'hmanhwa',
'instamanhwa',
'manhwa18',
'manhwa68',
'manhwa365',
'manhwahentaime',
'manhwamanga',
'manhwatop',
'manhwa',
'manytoon',
'manwha',
'readmanhwa',
'skymanga',
'toonily',
'webtoonxyz',
],
[MangaType.MANHUA]: [
'1st kiss manhua',
'hero manhua',
'manhuabox',
'manhuaus',
'manhuas',
'manhuas',
'readmanhua',
'wuxiaworld',
'manhua',
],
};
export const MANGA_TAGS_BY_MANGA_TYPE: Record<MangaType, string[]> = {
[MangaType.MANGA]: ['manga'],
[MangaType.COMIC]: ['comic'],
[MangaType.WEBTOON]: ['webtoon', 'long strip'],
[MangaType.MANHWA]: ['manhwa'],
[MangaType.MANHUA]: ['manhua'],
};