A photo manager for VRChat.

Only load vrchat photos

phaz.uk dea7ea4b 882c547f

verified
Changed files
+10 -2
src-tauri
src
frontend_calls
+7 -1
changelog
··· 121 121 122 122 Hotfix 1: 123 123 - Fixed loading when an image file is corrupted 124 - - Fixed update prompt when not connected to internet 124 + - Fixed update prompt when not connected to internet 125 + 126 + v0.2.7: 127 + - Fixed image resizing when window is thinner than image 128 + - Fixed closing settings with keybinds 129 + - Fixed the behaviour of changing the photo path 130 + - Fixed loading photos in folders that aren't VRChat folders
+3 -1
src-tauri/src/frontend_calls/load_photos.rs
··· 16 16 let base_dir = cache.get("photo-path".into()).unwrap(); 17 17 18 18 thread::spawn(move || { 19 - 20 19 let mut photos: Vec<path::PathBuf> = Vec::new(); 21 20 let mut size: usize = 0; 22 21 22 + let re = Regex::new(r"^[0-9]{4}-[0-9]{2}$").unwrap(); 23 + 23 24 for folder in fs::read_dir(&base_dir).unwrap() { 24 25 let f = folder.unwrap(); 26 + if !re.is_match(f.file_name().to_str().unwrap()){ continue; } 25 27 26 28 if f.metadata().unwrap().is_dir() { 27 29 for photo in fs::read_dir(f.path()).unwrap() {