mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-03-02 02:31:35 +00:00
Display how recently channels were refreshed
This commit is contained in:
parent
2e69dfc4b7
commit
83dec0c7ab
4 changed files with 31 additions and 10 deletions
|
|
@ -9,6 +9,9 @@ const prepared = {
|
|||
+ " ( videoId, title, author, authorId, published, viewCountText, descriptionHtml)"
|
||||
+ " VALUES"
|
||||
+ " (@videoId, @title, @author, @authorId, @published, @viewCountText, @descriptionHtml)"
|
||||
),
|
||||
channel_refreshed_update: db.prepare(
|
||||
"UPDATE Channels SET refreshed = ? WHERE ucid = ?"
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -70,6 +73,8 @@ function refreshChannel(ucid) {
|
|||
// store
|
||||
prepared.video_insert.run(video)
|
||||
})
|
||||
// update channel refreshed
|
||||
prepared.channel_refreshed_update.run(Date.now(), ucid)
|
||||
console.log(`updated ${root.length} videos for channel ${ucid}`)
|
||||
} else if (root.identifier === "PUBLISHED_DATES_NOT_PROVIDED") {
|
||||
return [] // nothing we can do. skip this iteration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue