diff --git a/src/config.rs b/src/config.rs index 8e6da98..1e3c57c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -476,7 +476,9 @@ fn test_preferences_read_write() { }; amend(&db, &initial_config).unwrap(); - let new_preferences = Preferences {}; + let new_preferences = Preferences { + lastfm_username: None, + }; write_preferences(&db, "Teddy🐻", &new_preferences).unwrap(); let read_preferences = read_preferences(&db, "Teddy🐻").unwrap(); diff --git a/src/thumbnails.rs b/src/thumbnails.rs index 207bb50..23acfda 100644 --- a/src/thumbnails.rs +++ b/src/thumbnails.rs @@ -41,7 +41,7 @@ pub fn get_thumbnail(real_path: &Path, max_dimension: u32) -> Result { out_path.push(format!("{}.jpg", hash.to_string())); if !out_path.exists() { - let quality = 95; + let quality = 80; let source_aspect_ratio: f32 = source_width as f32 / source_height as f32; let mut final_image; @@ -62,7 +62,6 @@ pub fn get_thumbnail(real_path: &Path, max_dimension: u32) -> Result { (out_dimension - scaled_width) / 2, (out_dimension - scaled_height) / 2, ); - final_image.write_to(&mut out_file, ImageOutputFormat::JPEG(quality))?; } else { final_image = source_image.resize_exact(out_dimension, out_dimension, FilterType::Lanczos3);