mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: Add functions for multiplayer repack, multi-language support, and repack language based on repacker
This commit is contained in:
parent
2662ba3875
commit
ada218cea1
1 changed files with 19 additions and 0 deletions
19
src/renderer/src/helpers/searcher.ts
Normal file
19
src/renderer/src/helpers/searcher.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
export const isMultiplayerRepack = (title: string) => {
|
||||
const toLower = title.toLowerCase();
|
||||
|
||||
return toLower.includes("multiplayer") || toLower.includes("onlinefix") || toLower.includes("online fix")
|
||||
}
|
||||
|
||||
export const supportMultiLanguage = (title: string) => {
|
||||
const multiFollowedByDigitsRegex = /multi\d+/;
|
||||
|
||||
return multiFollowedByDigitsRegex.test(title.toLowerCase());
|
||||
}
|
||||
|
||||
export const getRepackLanguageBasedOnRepacker = (repacker: string) => {
|
||||
const repackMap = {
|
||||
'xatab': 'ru',
|
||||
}
|
||||
|
||||
return repackMap[repacker.toLowerCase()] || 'en';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue