Abort initial run of one-shot

This commit is contained in:
DataHoarder 2022-07-02 20:58:31 +02:00
parent ddc941f245
commit a5f6939824
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -1040,7 +1040,7 @@ properly into a mkv file. Specify mkvmerge as the concatenation method by settin
/// Returns unfinished chunks and number of total chunks
fn load_or_gen_chunk_queue(&mut self, splits: &[Scene]) -> anyhow::Result<(Vec<Chunk>, usize)> {
if self.one_shot_resume {
if self.resume && self.one_shot_resume {
let mut chunks = read_chunk_queue(self.temp.as_ref())?;
let num_chunks = chunks.len();
@ -1149,6 +1149,12 @@ properly into a mkv file. Specify mkvmerge as the concatenation method by settin
let (mut chunk_queue, total_chunks) = self.load_or_gen_chunk_queue(&splits)?;
if self.one_shot_resume && !self.resume {
info!("Aborted first one-shot run");
//Abort first run!
return Ok(())
}
if self.resume || self.one_shot_resume {
let chunks_done = get_done().done.len();
info!(