feat(movie): Finish movie parser
Finish movie parser, not yet implemented actual moving. Also not yet implemented series.
This commit is contained in:
parent
0ecd7378ce
commit
18882983a2
6 changed files with 459 additions and 1226 deletions
18
src/main.rs
18
src/main.rs
|
@ -1,6 +1,6 @@
|
|||
mod config;
|
||||
mod directory;
|
||||
mod media;
|
||||
mod movie;
|
||||
|
||||
use log::*;
|
||||
use clap::Parser;
|
||||
|
@ -21,6 +21,14 @@ struct Args {
|
|||
#[arg(short, long)]
|
||||
first_run: bool,
|
||||
|
||||
/// Move files rather than copying them
|
||||
#[arg(short, long, name="move")]
|
||||
moov: bool,
|
||||
|
||||
/// Look for shows instead of movies
|
||||
#[arg(short, long)]
|
||||
shows: bool,
|
||||
|
||||
/// Custom config file
|
||||
#[arg(short, long, value_name = "FILE")]
|
||||
config: Option<PathBuf>,
|
||||
|
@ -64,8 +72,14 @@ fn main() {
|
|||
};
|
||||
|
||||
//let files = directory::walk_path(search_path);
|
||||
directory::search_path(search_path, cfg).unwrap();
|
||||
let moves = directory::search_path(search_path, cfg).unwrap();
|
||||
|
||||
|
||||
for move_file in moves {
|
||||
info!("Moving: {:#?}: {:#?}", args.moov, move_file);
|
||||
_ = move_file.from;
|
||||
_ = move_file.to;
|
||||
}
|
||||
/*for file in files.clone() {
|
||||
info!("Found: {}", file.to_str().unwrap());
|
||||
}*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue