mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2026-10-22 22:32:08 +03:00
Simplify
This commit is contained in:
1 parent
2ff95c27c5
commit
cf729aaef3
2 files changed
+1
-13
No files matched your search
@@ -196,7 +196,6 @@ pub fn analyze_cue_streaming(tracks: Vec<cue::CueTrack>,) -> BlissResult<Receive
|
||||
idx += 1;
|
||||
|
||||
log::debug!("Extracting '{}'", track_path);
|
||||
if cue_track.duration<last_track_duration {
|
||||
match Exec::cmd("ffmpeg").arg("-i").arg(&audio_path)
|
||||
.arg("-ss").arg(&cue_track.start.hhmmss())
|
||||
.arg("-t").arg(&cue_track.duration.hhmmss())
|
||||
@@ -207,17 +206,6 @@ pub fn analyze_cue_streaming(tracks: Vec<cue::CueTrack>,) -> BlissResult<Receive
|
||||
Ok(_) => { },
|
||||
Err(e) => { log::error!("Failed to call ffmpeg. {}", e); }
|
||||
}
|
||||
} else {
|
||||
match Exec::cmd("ffmpeg").arg("-i").arg(&audio_path)
|
||||
.arg("-ss").arg(&cue_track.start.hhmmss())
|
||||
.arg("-c").arg("copy")
|
||||
.arg(String::from(tmp_file.to_string_lossy()))
|
||||
.stderr(NullFile)
|
||||
.join() {
|
||||
Ok(_) => { },
|
||||
Err(e) => { log::error!("Failed to call ffmpeg. {}", e); }
|
||||
}
|
||||
}
|
||||
|
||||
if ! cfg!(windows) {
|
||||
// ffmpeg seeks to break echo on terminal? 'stty echo' restores...
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
pub const MARKER:&str = ".CUE_TRACK.";
|
||||
pub const LAST_TRACK_DURATION:u64 = 60*60*24*7;
|
||||
pub const LAST_TRACK_DURATION:u64 = 60*60*24;
|
||||
const GENRE:&str = "GENRE";
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in new issue
Block a user