mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
🍱 Removed logs
This commit is contained in:
parent
685f9615ca
commit
ff83dfc62d
1 changed files with 6 additions and 8 deletions
|
@ -61,11 +61,10 @@ const URLResolverCache = (() =>
|
||||||
const expireAtCursorRequest = transaction.objectStore("store").index("expireAt").openCursor(range)
|
const expireAtCursorRequest = transaction.objectStore("store").index("expireAt").openCursor(range)
|
||||||
expireAtCursorRequest.addEventListener('success', () =>
|
expireAtCursorRequest.addEventListener('success', () =>
|
||||||
{
|
{
|
||||||
const timestampCursor = expireAtCursorRequest.result
|
const expireCursor = expireAtCursorRequest.result
|
||||||
if (!timestampCursor) return
|
if (!expireCursor) return
|
||||||
console.log("deleting: " + timestampCursor)
|
expireCursor.delete()
|
||||||
timestampCursor.delete()
|
expireCursor.continue()
|
||||||
timestampCursor.continue()
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -76,9 +75,7 @@ const URLResolverCache = (() =>
|
||||||
return await new Promise((resolve, reject) =>
|
return await new Promise((resolve, reject) =>
|
||||||
{
|
{
|
||||||
const db = openRequest.result
|
const db = openRequest.result
|
||||||
console.log('new put!')
|
|
||||||
if (!db) return resolve()
|
if (!db) return resolve()
|
||||||
console.log('new put')
|
|
||||||
const store = db.transaction("store", "readwrite").objectStore("store")
|
const store = db.transaction("store", "readwrite").objectStore("store")
|
||||||
const putRequest = store.put({ value: url, expireAt: new Date(Date.now() + 24 * 60 * 60 * 1000) }, id)
|
const putRequest = store.put({ value: url, expireAt: new Date(Date.now() + 24 * 60 * 60 * 1000) }, id)
|
||||||
putRequest.addEventListener('success', () => resolve())
|
putRequest.addEventListener('success', () => resolve())
|
||||||
|
@ -265,10 +262,11 @@ export const ytService = {
|
||||||
.filter((descriptorId) => descriptorId)
|
.filter((descriptorId) => descriptorId)
|
||||||
.join(urlResolverFunction.paramArraySeperator)
|
.join(urlResolverFunction.paramArraySeperator)
|
||||||
)
|
)
|
||||||
|
|
||||||
const apiResponse = await fetch(url.toString(), { cache: 'no-store' });
|
const apiResponse = await fetch(url.toString(), { cache: 'no-store' });
|
||||||
if (!apiResponse.ok) break
|
if (!apiResponse.ok) break
|
||||||
const values = followResponsePath<string[]>(await apiResponse.json(), urlResolverFunction.responsePath)
|
const values = followResponsePath<string[]>(await apiResponse.json(), urlResolverFunction.responsePath)
|
||||||
console.log('hellooo')
|
|
||||||
await Promise.all(values.map(async (value, index) => {
|
await Promise.all(values.map(async (value, index) => {
|
||||||
const descriptor = descriptorsGroup[index]
|
const descriptor = descriptorsGroup[index]
|
||||||
if (value) results[descriptor.index] = value
|
if (value) results[descriptor.index] = value
|
||||||
|
|
Loading…
Add table
Reference in a new issue