chore
This commit is contained in:
parent
4db735e026
commit
5525fb1470
@ -19,7 +19,7 @@ document.querySelectorAll('.grid.h-10.grid-cols-12.place-content-center.gap-x-3.
|
||||
if (!data.name.endsWith('.bin') && !data.name.endsWith('.pth'))
|
||||
return
|
||||
|
||||
data.desc = {en: '', zh: ''}
|
||||
data.desc = { en: '', zh: '', ja: '' }
|
||||
const rawText = await (await fetch(e.children[1].href.replace('/resolve/', '/raw/'))).text()
|
||||
|
||||
data.size = parseInt(extractValue(rawText, 'size'))
|
||||
@ -27,6 +27,7 @@ document.querySelectorAll('.grid.h-10.grid-cols-12.place-content-center.gap-x-3.
|
||||
data.lastUpdated = e.children[3].children[0].getAttribute('datetime')
|
||||
data.url = e.children[1].href.replace('/resolve/', '/blob/')
|
||||
data.downloadUrl = e.children[1].href
|
||||
data.tags = []
|
||||
|
||||
modelsJson.push(data)
|
||||
})
|
||||
|
@ -90,7 +90,7 @@ export async function refreshLocalModels(cache: {
|
||||
for (let i = 0; i < cache.models.length; i++) {
|
||||
if (!cache.models[i].lastUpdatedMs)
|
||||
cache.models[i].lastUpdatedMs = Date.parse(cache.models[i].lastUpdated);
|
||||
if (!cache.models[i].tags)
|
||||
if (!cache.models[i].tags || !Array.isArray(cache.models[i].tags) || cache.models[i].tags?.length === 0)
|
||||
cache.models[i].tags = ['Other'];
|
||||
|
||||
for (let j = i + 1; j < cache.models.length; j++) {
|
||||
|
Loading…
Reference in New Issue
Block a user