parent
6ce7384c8a
commit
151576df14
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ impl Video {
|
||||||
let vid_duration = get_vid_duration(v).unwrap();
|
let vid_duration = get_vid_duration(v).unwrap();
|
||||||
|
|
||||||
if let Some(meta) = yt_meta::get_youtube_metadata(v) {
|
if let Some(meta) = yt_meta::get_youtube_metadata(v) {
|
||||||
sqlx::query("INSERT INTO youtube_meta (id, title, description, uploader_name, uploader_id, views, upload_date) VALUES ($1, $2, $3, $4, $5, $6, $7)")
|
sqlx::query("INSERT INTO youtube_meta (id, title, description, uploader_name, uploader_id, views, upload_date) VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (id) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, uploader_name = EXCLUDED.uploader_name, uploader_id = EXCLUDED.uploader_id, views = EXCLUDED.views, upload_date = EXCLUDED.upload_date;")
|
||||||
.bind(&meta.youtube_id().unwrap())
|
.bind(&meta.youtube_id().unwrap())
|
||||||
.bind(&meta.title())
|
.bind(&meta.title())
|
||||||
.bind(&meta.description().unwrap())
|
.bind(&meta.description().unwrap())
|
||||||
|
|
Loading…
Add table
Reference in a new issue