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.

feat: Initial implementation of `failed_videos` table

for... video that failed the indexing

0xBA5E64 653997e5 8f6865bc

+33 -1
+12
.sqlx/query-67778dff2e1b902c9332eba688d718ed6c3239b3600b969425be0d3b065caca1.json
··· 1 + { 2 + "db_name": "SQLite", 3 + "query": "INSERT INTO failed_videos (video_path, error) VALUES (?1, ?2) ON CONFLICT (video_path) DO UPDATE SET error=excluded.error", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Right": 2 8 + }, 9 + "nullable": [] 10 + }, 11 + "hash": "67778dff2e1b902c9332eba688d718ed6c3239b3600b969425be0d3b065caca1" 12 + }
+2
migrations/20260418184648_add-failed-videos-table.down.sql
··· 1 + -- Add down migration script here 2 + DROP TABLE IF EXISTS failed_videos;
+5
migrations/20260418184648_add-failed-videos-table.up.sql
··· 1 + -- Add up migration script here 2 + CREATE TABLE failed_videos ( 3 + video_path text NOT NULL UNIQUE, 4 + error text NOT NULL 5 + );
+14 -1
src/lib.rs
··· 96 96 97 97 for path in files { 98 98 if let Err(error) = index_video(&path, db_pool).await { 99 - log::error!("Couldn't index \"{}\" - {}", path.to_string_lossy(), error); 99 + let path_str = path.to_string_lossy().to_string(); 100 + let err_str = error.to_string(); 101 + 102 + log::error!("Couldn't index \"{}\" - {}", path_str, err_str); 103 + 104 + sqlx::query!( 105 + "INSERT INTO failed_videos (video_path, error) VALUES (?1, ?2) ON CONFLICT (video_path) DO UPDATE SET error=excluded.error", 106 + path_str, 107 + err_str 108 + ) 109 + .execute(db_pool) 110 + .await 111 + .map_err(|_| IndexError::DatabaseError)?; 112 + 100 113 continue; 101 114 }; 102 115