diff options
Diffstat (limited to 'src/cmd/list.rs')
-rw-r--r-- | src/cmd/list.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/list.rs b/src/cmd/list.rs index f34c333..3c2d42a 100644 --- a/src/cmd/list.rs +++ b/src/cmd/list.rs @@ -29,7 +29,10 @@ fn mid_to_rec_time(mid: &str) -> f64 { let Some(sep) = mid[dec + 1..].find('.') else { return 0.0; }; - mid[..dec + 1 + sep].parse().unwrap() + mid[..dec + 1 + sep] + .parse() + .or_else(|_| mid[..dec].parse()) + .unwrap_or(0.0) } fn sort_by_and_take( |