refactor(Madara): replaced worksSources check with sourceTypeMap

This commit is contained in:
xMohnad
2025-06-23 08:21:32 +00:00
parent 810c60deec
commit b2413e343c

View File

@@ -502,8 +502,13 @@ class Madara extends MProvider {
} }
String getMangaSubString() { String getMangaSubString() {
const worksSources = {"Olaoe", "Mangax Core"}; const sourceTypeMap = {
return worksSources.contains(source.name) ? "works" : "manga"; "Olaoe": "works",
"Mangax Core": "works",
"Azora": "series",
};
return sourceTypeMap[source.name] ?? "manga";
} }
} }