This commit is contained in:
@@ -25,15 +25,15 @@ type GameMap = Record<
|
||||
}
|
||||
>
|
||||
|
||||
const songFiles = {
|
||||
...(import.meta as any).globEager('./Data/*/*/Songs/*.mp3'),
|
||||
...(import.meta as any).globEager('./Data/*/*/songs/*.mp3')
|
||||
} as Record<string, { default: string }>
|
||||
const songFiles = import.meta.globEager('./Data/*/*/songs/*.mp3') as Record<
|
||||
string,
|
||||
{ default: string }
|
||||
>
|
||||
|
||||
const answerFiles = {
|
||||
...(import.meta as any).globEager('./Data/*/*/Answers/*.mp3'),
|
||||
...(import.meta as any).globEager('./Data/*/*/answers/*.mp3')
|
||||
} as Record<string, { default: string }>
|
||||
const answerFiles = import.meta.globEager('./Data/*/*/answers/*.mp3') as Record<
|
||||
string,
|
||||
{ default: string }
|
||||
>
|
||||
|
||||
const getParts = (path: string) => {
|
||||
const normalized = path.replace(/\\/g, '/')
|
||||
@@ -67,9 +67,7 @@ const addEntry = (target: GameMap, info: ReturnType<typeof getParts>, url: strin
|
||||
clues: []
|
||||
}
|
||||
}
|
||||
const normalizedType = type?.toLowerCase()
|
||||
if (normalizedType !== 'songs' && normalizedType !== 'answers') return
|
||||
const bucket = normalizedType === 'songs' ? 'songs' : 'answers'
|
||||
const bucket = type === 'Songs' ? 'songs' : 'answers'
|
||||
target[game].categories[category][bucket][number] = url
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user