monthly update: fixes
This commit is contained in:
18
lib/db.js
18
lib/db.js
@@ -27,13 +27,17 @@ async function get_db() {
|
||||
|
||||
async function insertDownload(url, title, thumbnail, size, PID) {
|
||||
const uid = uuid.v1()
|
||||
db
|
||||
.prepare(`
|
||||
INSERT INTO downloads
|
||||
(uid, url, title, thumbnail, size, process_pid)
|
||||
VALUES (?, ?, ?, ?, ?, ?)`
|
||||
)
|
||||
.run(uid, url, title, thumbnail, size, PID)
|
||||
try {
|
||||
db
|
||||
.prepare(`
|
||||
INSERT INTO downloads
|
||||
(uid, url, title, thumbnail, size, process_pid)
|
||||
VALUES (?, ?, ?, ?, ?, ?)`
|
||||
)
|
||||
.run(uid, url, title, thumbnail, size, PID)
|
||||
} catch (error) {
|
||||
logger('db', 'some error occourred')
|
||||
}
|
||||
|
||||
return uid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user