This commit is contained in:
parent
4ede8e16e8
commit
954e660343
1 changed files with 2 additions and 2 deletions
|
@ -146,7 +146,7 @@ impl Video {
|
|||
|
||||
for cat in meta.categories().unwrap() {
|
||||
sqlx::query(
|
||||
"INSERT INTO youtube_meta_categories (youtube_id, category) VALUES ($1, $2)",
|
||||
"INSERT INTO youtube_meta_categories (youtube_id, category) VALUES ($1, $2) ON CONFLICT DO NOTHING",
|
||||
)
|
||||
.bind(meta.youtube_id().unwrap())
|
||||
.bind(cat)
|
||||
|
@ -157,7 +157,7 @@ impl Video {
|
|||
|
||||
if let Some(tags) = meta.tags() {
|
||||
for tag in tags {
|
||||
sqlx::query("INSERT INTO youtube_meta_tags (youtube_id, tag) VALUES ($1, $2)")
|
||||
sqlx::query("INSERT INTO youtube_meta_tags (youtube_id, tag) VALUES ($1, $2) ON CONFLICT DO NOTHING")
|
||||
.bind(&meta.youtube_id().unwrap())
|
||||
.bind(&tag)
|
||||
.execute(&mut *tx)
|
||||
|
|
Loading…
Add table
Reference in a new issue