diff --git a/CREDITS.md b/CREDITS.md index 69b4e26..5be1e5e 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -1,38 +1,37 @@ # Project Dependencies Package: riprip - Version: 0.2.0 - Generated: 2023-10-05 22:27:19 UTC + Version: 0.2.1 + Generated: 2023-11-07 03:46:42 UTC | Package | Version | Author(s) | License | | ---- | ---- | ---- | ---- | -| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.3 | [Tom Kaitchuck](mailto:tom.kaitchuck@gmail.com) | Apache-2.0 or MIT | +| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.6 | [Tom Kaitchuck](mailto:tom.kaitchuck@gmail.com) | Apache-2.0 or MIT | | [argyle](https://github.com/Blobfolio/argyle) | 0.6.8 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | -| [base64](https://github.com/marshallpierce/rust-base64) | 0.21.4 | [Alice Maz](mailto:alice@alicemaz.com) and [Marshall Pierce](mailto:marshall@mpierce.org) | Apache-2.0 or MIT | +| [base64](https://github.com/marshallpierce/rust-base64) | 0.21.5 | [Alice Maz](mailto:alice@alicemaz.com) and [Marshall Pierce](mailto:marshall@mpierce.org) | Apache-2.0 or MIT | | [block-buffer](https://github.com/RustCrypto/utils) | 0.10.4 | RustCrypto Developers | Apache-2.0 or MIT | | [bytecount](https://github.com/llogiq/bytecount) | 0.6.4 | [Andre Bogus](mailto:bogusandre@gmail.de) and [Joshua Landau](mailto:joshua@landau.ws) | Apache-2.0 or MIT | -| [cdtoc](https://github.com/Blobfolio/cdtoc) | 0.3.1 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | +| [cdtoc](https://github.com/Blobfolio/cdtoc) | 0.3.2 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | | [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:alex@alexcrichton.com) | Apache-2.0 or MIT | | [crc32fast](https://github.com/srijs/rust-crc32fast) | 1.3.2 | [Sam Rijs](mailto:srijs@airpost.net) and [Alex Crichton](mailto:alex@alexcrichton.com) | Apache-2.0 or MIT | | [crypto-common](https://github.com/RustCrypto/traits) | 0.1.6 | RustCrypto Developers | Apache-2.0 or MIT | | [ctrlc](https://github.com/Detegr/rust-ctrlc.git) | 3.4.1 | [Antti Keränen](mailto:detegr@gmail.com) | Apache-2.0 or MIT | -| [dactyl](https://github.com/Blobfolio/dactyl) | 0.5.2 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | +| [dactyl](https://github.com/Blobfolio/dactyl) | 0.6.0 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | | [digest](https://github.com/RustCrypto/traits) | 0.10.7 | RustCrypto Developers | Apache-2.0 or MIT | | [faster-hex](https://github.com/NervosFoundation/faster-hex) | 0.8.1 | [zhangsoledad](mailto:787953403@qq.com) | MIT | | [fastrand](https://github.com/smol-rs/fastrand) | 2.0.1 | [Stjepan Glavina](mailto:stjepang@gmail.com) | Apache-2.0 or MIT | | [form_urlencoded](https://github.com/servo/rust-url) | 1.2.0 | The rust-url developers | Apache-2.0 or MIT | -| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.11.6 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | +| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.11.7 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | | [generic-array](https://github.com/fizyk20/generic-array.git) | 0.14.7 | [Bartłomiej Kamiński](mailto:fizyk20@gmail.com) and [Aaron Trent](mailto:novacrazy@gmail.com) | MIT | | [idna](https://github.com/servo/rust-url/) | 0.4.0 | The rust-url developers | Apache-2.0 or MIT | | [itoa](https://github.com/dtolnay/itoa) | 1.0.9 | [David Tolnay](mailto:dtolnay@gmail.com) | Apache-2.0 or MIT | | [libcdio-sys](https://github.com/gmes78/libcdio-sys) | 0.5.0 | [Joaquim Monteiro](mailto:joaquim.monteiro@protonmail.com) | GPL-3.0+ | | [log](https://github.com/rust-lang/log) | 0.4.20 | The Rust Project Developers | Apache-2.0 or MIT | -| [num-traits](https://github.com/rust-num/num-traits) | 0.2.16 | The Rust Project Developers | Apache-2.0 or MIT | | [once_cell](https://github.com/matklad/once_cell) | 1.18.0 | [Aleksey Kladov](mailto:aleksey.kladov@gmail.com) | Apache-2.0 or MIT | | [oxford_join](https://github.com/Blobfolio/oxford_join) | 0.2.9 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | | [percent-encoding](https://github.com/servo/rust-url/) | 2.3.0 | The rust-url developers | Apache-2.0 or MIT | -| [riprip_core](https://github.com/Blobfolio/riprip) | 0.2.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL | +| [riprip_core](https://github.com/Blobfolio/riprip) | 0.2.1 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL | | [sha1](https://github.com/RustCrypto/hashes) | 0.10.6 | RustCrypto Developers | Apache-2.0 or MIT | -| [tempfile](https://github.com/Stebalien/tempfile) | 3.8.0 | [Steven Allen](mailto:steven@stebalien.com), The Rust Project Developers, [Ashley Mannix](mailto:ashleymannix@live.com.au), and [Jason White](mailto:me@jasonwhite.io) | Apache-2.0 or MIT | +| [tempfile](https://github.com/Stebalien/tempfile) | 3.8.1 | [Steven Allen](mailto:steven@stebalien.com), The Rust Project Developers, [Ashley Mannix](mailto:ashleymannix@live.com.au), and [Jason White](mailto:me@jasonwhite.io) | Apache-2.0 or MIT | | [term_size](https://github.com/kbknapp/term_size-rs.git) | 0.3.2 | [Kevin K.](mailto:kbknapp@gmail.com) and [Benjamin Sago](mailto:ogham@bsago.me) | Apache-2.0 or MIT | | [tinyvec](https://github.com/Lokathor/tinyvec) | 1.6.0 | [Lokathor](mailto:zefria@gmail.com) | Apache-2.0, MIT, or Zlib | | [tinyvec_macros](https://github.com/Soveu/tinyvec_macros) | 0.1.1 | [Soveu](mailto:marx.tomasz@gmail.com) | Apache-2.0, MIT, or Zlib | @@ -44,3 +43,4 @@ | [ureq](https://github.com/algesten/ureq) | 2.8.0 | [Martin Algesten](mailto:martin@algesten.se) and [Jacob Hoffman-Andrews](mailto:ureq@hoffman-andrews.com) | Apache-2.0 or MIT | | [url](https://github.com/servo/rust-url) | 2.4.1 | The rust-url developers | Apache-2.0 or MIT | | [utc2k](https://github.com/Blobfolio/utc2k) | 0.7.0 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | +| [zerocopy](https://github.com/google/zerocopy) | 0.7.25 | [Joshua Liebow-Feeser](mailto:joshlf@google.com) | Apache-2.0, BSD-2-Clause, or MIT | diff --git a/release/man/riprip.1 b/release/man/riprip.1 index 8cc7d3a..4952af9 100644 --- a/release/man/riprip.1 +++ b/release/man/riprip.1 @@ -1,6 +1,6 @@ -.TH "RIP RIP HOORAY!" "1" "October 2023" "Rip Rip Hooray! v0.2.0" "User Commands" +.TH "RIP RIP HOORAY!" "1" "November 2023" "Rip Rip Hooray! v0.2.1" "User Commands" .SH NAME -Rip Rip Hooray! \- Manual page for riprip v0.2.0. +Rip Rip Hooray! \- Manual page for riprip v0.2.1. .SH DESCRIPTION A specialized audio CD\-ripper optimized for incremental data recovery. .SS USAGE: diff --git a/riprip/Cargo.toml b/riprip/Cargo.toml index e0dde72..0f7728a 100644 --- a/riprip/Cargo.toml +++ b/riprip/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "riprip" -version = "0.2.0" +version = "0.2.1" license = "WTFPL" authors = ["Josh Stoik "] edition = "2021" @@ -125,7 +125,7 @@ duplicate = true [dependencies] argyle = "0.6.*" ctrlc = "3.4.*" -dactyl = "0.5" +dactyl = "0.6.*" oxford_join = "0.2.*" trimothy = "0.2.*" utc2k = "0.7.*" diff --git a/riprip/src/main.rs b/riprip/src/main.rs index 5ec5a58..191fe4c 100644 --- a/riprip/src/main.rs +++ b/riprip/src/main.rs @@ -256,16 +256,16 @@ fn parse_rip_options(args: &Argue, drive: Option, disc: &Disc) if let Some(pos) = v.iter().position(|b| b','.eq(b)) { let tmp = &v[..pos]; if ! tmp.is_empty() { - a = u8::btou(tmp).ok_or(RipRipError::CliParse("-r,--rereads"))?; + a = u8::btou(tmp).ok_or(RipRipError::CliParse("-r/--rereads"))?; } let tmp = &v[pos + 1..]; if ! tmp.is_empty() { - b = u8::btou(tmp).ok_or(RipRipError::CliParse("-r,--rereads"))?; + b = u8::btou(tmp).ok_or(RipRipError::CliParse("-r/--rereads"))?; } } // A number by itself affects only the first part. else { - a = u8::btou(v).ok_or(RipRipError::CliParse("-r,--rereads"))?; + a = u8::btou(v).ok_or(RipRipError::CliParse("-r/--rereads"))?; } opts = opts.with_rereads(a, b); diff --git a/riprip_core/Cargo.toml b/riprip_core/Cargo.toml index 50572db..62e4fbb 100644 --- a/riprip_core/Cargo.toml +++ b/riprip_core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "riprip_core" -version = "0.2.0" +version = "0.2.1" license = "WTFPL" authors = ["Josh Stoik "] edition = "2021" @@ -13,7 +13,7 @@ publish = false [dependencies] cdtoc = "0.3.*" crc32fast = "1.3.2" -dactyl = "0.5.*" +dactyl = "0.6.*" tempfile = "3.8.0" trimothy = "0.2.*" utc2k = "0.7.*" diff --git a/riprip_core/src/cdio.rs b/riprip_core/src/cdio.rs index 2bcdb73..078b914 100644 --- a/riprip_core/src/cdio.rs +++ b/riprip_core/src/cdio.rs @@ -46,10 +46,17 @@ use std::{ }, path::Path, sync::Once, + time::{ + Duration, + Instant, + }, }; +/// # Cache Bust Timeout. +const CACHE_BUST_TIMEOUT: Duration = Duration::from_secs(45); + /// # Initialization Counter. static LIBCDIO_INIT: Once = Once::new(); @@ -418,15 +425,17 @@ impl LibcdioInstance { killed: &KillSwitch, ) { if 0 != todo && buf.len() == usize::from(CD_DATA_SIZE) { + let now = Instant::now(); + // If we're moving backwards, try after, then before. if backwards { - self._cache_bust(buf, rng.end, leadout, &mut todo, killed); - self._cache_bust(buf, 0, rng.start - 1, &mut todo, killed); + self._cache_bust(buf, rng.end, leadout, &mut todo, now, killed); + self._cache_bust(buf, 0, rng.start - 1, &mut todo, now, killed); } // Otherwise before, then after. else { - self._cache_bust(buf, 0, rng.start - 1, &mut todo, killed); - self._cache_bust(buf, rng.end, leadout, &mut todo, killed); + self._cache_bust(buf, 0, rng.start - 1, &mut todo, now, killed); + self._cache_bust(buf, rng.end, leadout, &mut todo, now, killed); } } } @@ -442,10 +451,14 @@ impl LibcdioInstance { mut from: i32, to: i32, todo: &mut u32, + now: Instant, killed: &KillSwitch, ) { while from < to && 0 < *todo { - if killed.killed() { break; } + if killed.killed() || CACHE_BUST_TIMEOUT < now.elapsed() { + *todo = 0; + break; + } if ! SHITLIST.with_borrow(|q| q.contains(&from)) && self.read_cd(buf, from, false, 0, CD_DATA_SIZE).is_ok() diff --git a/riprip_core/src/rip/sample.rs b/riprip_core/src/rip/sample.rs index 6e6881f..deb429f 100644 --- a/riprip_core/src/rip/sample.rs +++ b/riprip_core/src/rip/sample.rs @@ -119,7 +119,7 @@ impl RipSample { Self::Maybe(s) => { let (a, mut b) = s.contention(); b = b.saturating_mul(rereads.1); - if b == u8::MAX { b = u8::MAX - 1; } + if b == u8::MAX { b -= 1; } rereads.0 <= a && b <= a } // Never likely.