mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-11 17:40:05 -04:00
Update store.js
This commit is contained in:
parent
4d055b49cc
commit
10d9ac7870
1 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ export function search(_query) {
|
|||
}
|
||||
} else {
|
||||
const regex = new RegExp(f.value.replaceAll(',', '|'), 'i')
|
||||
results.push(c._searchable[f.field] && regex.test(c._searchable[f.field]))
|
||||
results.push(regex.test(c._searchable[f.field]))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,11 +95,11 @@ export async function fetchChannels() {
|
|||
function generateSearchable(c) {
|
||||
const searchable = {}
|
||||
for (let key in c) {
|
||||
if (key.startsWith('_') || c[key] === null || c[key] === undefined) continue
|
||||
if (key.startsWith('_')) continue
|
||||
if (Array.isArray(c[key])) {
|
||||
searchable[key] = c[key].map(v => v.toString().toLowerCase()).join(',')
|
||||
} else {
|
||||
searchable[key] = c[key].toString().toLowerCase()
|
||||
searchable[key] = c[key] ? c[key].toString().toLowerCase() : ''
|
||||
}
|
||||
}
|
||||
searchable.streams = c._streams.length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue