also cleanup "Recording .. missing playback row"

This commit is contained in:
Scott Lamb 2021-02-11 20:10:38 -08:00
parent 7f711eedeb
commit fdb6603b5e

View File

@ -425,6 +425,12 @@ fn compare_stream(conn: &rusqlite::Connection, dir_id: i32, stream_id: i32, opts
None => { None => {
error!("Recording {} missing playback row: {:#?}", id, recording); error!("Recording {} missing playback row: {:#?}", id, recording);
printed_error = true; printed_error = true;
if opts.trash_orphan_sample_files {
ctx.files_to_trash.insert((dir_id, id));
}
if opts.delete_orphan_rows { // also delete recording/integrity rows, if any.
ctx.rows_to_delete.insert(id);
}
}, },
} }
match recording.file { match recording.file {