mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-29 19:21:33 -07:00
refactor(main): eliminate local pass-through wrappers in main.ts (#168)
This commit is contained in:
@@ -60,9 +60,7 @@ export function tsukihimeTrackMatchesLanguages(
|
||||
export function describeTsukihimeTabLanguages(configuredLanguages: string[]): string {
|
||||
const normalized = [
|
||||
...new Set(
|
||||
configuredLanguages
|
||||
.map((candidate) => normalizeTsukihimeLangCode(candidate))
|
||||
.filter(Boolean),
|
||||
configuredLanguages.map((candidate) => normalizeTsukihimeLangCode(candidate)).filter(Boolean),
|
||||
),
|
||||
];
|
||||
if (normalized.length === 0) return 'English';
|
||||
|
||||
@@ -76,10 +76,7 @@ function asFiniteNumber(value: unknown): number | null {
|
||||
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
||||
}
|
||||
|
||||
export function mapTsukihimeSearchResults(
|
||||
payload: unknown,
|
||||
maxResults: number,
|
||||
): TsukihimeEntry[] {
|
||||
export function mapTsukihimeSearchResults(payload: unknown, maxResults: number): TsukihimeEntry[] {
|
||||
if (!isObject(payload) || !Array.isArray(payload.results)) return [];
|
||||
const entries: TsukihimeEntry[] = [];
|
||||
for (const item of payload.results) {
|
||||
|
||||
Reference in New Issue
Block a user