refactor: renaming

This commit is contained in:
wea_ondara
2023-11-25 17:02:26 +01:00
parent 707d244aaf
commit 941d0d28a4

View File

@@ -25,7 +25,7 @@ export default class MangaUpdatesDataService {
}
private async findMissingRelations(mangaStore: MangaStore, dbStore: DbStore, progress: Progress): Promise<void> {
const allowTypes = new Set(['Manga', 'Manhwa', 'Manhua'].map(e => e.toLowerCase()));
const allowedTypes = new Set(['Manga', 'Manhwa', 'Manhua'].map(e => e.toLowerCase()));
const media = await dbStore.aniListMangaRepository.getMedia();
const relations = await dbStore.mangaUpdatesRepository.getRelations();
@@ -59,7 +59,7 @@ export default class MangaUpdatesDataService {
};
matching = results.results
.filter(e => stringSimilarity(cleaner(title), cleaner(decode(e.record.title)), 2, false) >= 0.95)
.filter(e => allowTypes.has(e.record.type.toLowerCase())) //check if a manga or similar but not novel
.filter(e => allowedTypes.has(e.record.type.toLowerCase())) //check if a manga or similar but not novel
.filter(e => m.startDate.year - 1 <= parseInt('' + e.record.year)
&& parseInt('' + e.record.year) <= m.startDate.year + 1); //check year +-1
if (matching.length === 0) {