handle bin/cue, ignore archives and torrents
This commit is contained in:
parent
8c0d9a7236
commit
0be1ec6fca
40
src/main.rs
40
src/main.rs
|
@ -181,24 +181,28 @@ fn handle_dir(path: PathBuf) {
|
||||||
|
|
||||||
if let Some(extension) = inode.path().extension().unwrap_or("none".as_ref()).to_str() {
|
if let Some(extension) = inode.path().extension().unwrap_or("none".as_ref()).to_str() {
|
||||||
match extension.to_string().to_lowercase().as_ref() {
|
match extension.to_string().to_lowercase().as_ref() {
|
||||||
"doc" => { handle_document(inode) }
|
"doc" => { handle_document(inode) }
|
||||||
"docx" => { handle_document(inode) }
|
"docx" => { handle_document(inode) }
|
||||||
"odt" => { handle_document(inode) }
|
"odt" => { handle_document(inode) }
|
||||||
"rtf" => { handle_document(inode) }
|
"rtf" => { handle_document(inode) }
|
||||||
"gif" => { handle_gif( inode) }
|
"gif" => { handle_gif( inode) }
|
||||||
"jpg" => { handle_image( inode) }
|
"jpg" => { handle_image( inode) }
|
||||||
"jpeg" => { handle_image( inode) }
|
"jpeg" => { handle_image( inode) }
|
||||||
"png" => { handle_image( inode) }
|
"png" => { handle_image( inode) }
|
||||||
"iso" => { handle_iso( inode) }
|
"bin" => { handle_iso( inode) }
|
||||||
"mp3" => { handle_mp3( inode) }
|
"cue" => { handle_iso( inode) }
|
||||||
"pdf" => { handle_pdf( inode) }
|
"iso" => { handle_iso( inode) }
|
||||||
"avi" => { handle_video( inode) }
|
"mp3" => { handle_mp3( inode) }
|
||||||
"m4v" => { handle_video( inode) }
|
"pdf" => { handle_pdf( inode) }
|
||||||
"mkv" => { handle_video( inode) }
|
"avi" => { handle_video( inode) }
|
||||||
"mp4" => { handle_video( inode) }
|
"m4v" => { handle_video( inode) }
|
||||||
"srt" => { handle_video( inode) }
|
"mkv" => { handle_video( inode) }
|
||||||
// todo other documents
|
"mp4" => { handle_video( inode) }
|
||||||
_ => { println!("Not sure what to do with file: {:?}.", inode.path()); }
|
"srt" => { handle_video( inode) }
|
||||||
|
"7z" => { }
|
||||||
|
"torrent" => { }
|
||||||
|
"zip" => { }
|
||||||
|
_ => { println!("Not sure what to do with file: {:?}.", inode.path()); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue