CLI utility to ingest embedded json metadata from yt-dlp downloads to a SQLite database file
yt-dlp
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Handle inserts "ON CONFLICT"

0xBA5E64 caf1f013 94bf09b5

+13 -13
-12
.sqlx/query-13bfb4a92111b6a792852ddc9efc7c8d8fe912103667e14b79dcfba4d145e56e.json
··· 1 - { 2 - "db_name": "SQLite", 3 - "query": "INSERT INTO videos (video_path, metadata) VALUES (?1, jsonb(?2))", 4 - "describe": { 5 - "columns": [], 6 - "parameters": { 7 - "Right": 2 8 - }, 9 - "nullable": [] 10 - }, 11 - "hash": "13bfb4a92111b6a792852ddc9efc7c8d8fe912103667e14b79dcfba4d145e56e" 12 - }
+12
.sqlx/query-cdef21ef97ab9cdc82eb4ce6d116f3636dd8adf043bd9fb999d18b2e4fc8502e.json
··· 1 + { 2 + "db_name": "SQLite", 3 + "query": "INSERT INTO videos (video_path, metadata) VALUES (?1, jsonb(?2)) ON CONFLICT (video_path) DO UPDATE SET metadata=excluded.metadata", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Right": 2 8 + }, 9 + "nullable": [] 10 + }, 11 + "hash": "cdef21ef97ab9cdc82eb4ce6d116f3636dd8adf043bd9fb999d18b2e4fc8502e" 12 + }
+1 -1
src/lib.rs
··· 83 83 }; 84 84 85 85 sqlx::query!( 86 - "INSERT INTO videos (video_path, metadata) VALUES (?1, jsonb(?2))", 86 + "INSERT INTO videos (video_path, metadata) VALUES (?1, jsonb(?2)) ON CONFLICT (video_path) DO UPDATE SET metadata=excluded.metadata", 87 87 video_path, 88 88 json 89 89 )