diff --git a/src/ui/window.rs b/src/ui/window.rs index e1d1e25..9e581c0 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -174,6 +174,10 @@ mod imp { fn constructed(&self) { self.parent_constructed(); + // wipe state directory on init (gets rid of stale mpris cover art) + let state_home = audrey::globals::xdg_dirs().get_state_home(); + std::fs::remove_dir_all(state_home).expect("could not remove xdg state home"); + if let Some(display) = gdk::Display::default() { gtk::style_context_add_provider_for_display(&display, &self.css_provider, 420); } @@ -761,7 +765,6 @@ mod imp { let mut mpris_art_path = audrey::globals::MPRIS_ART_PATH.lock().await; let save_future = audrey::globals::runtime().spawn_blocking( move || -> Result<(), image::ImageError> { - // TODO: wipe xdg state folder on init if let Some(path) = mpris_art_path.take() { if let Err(err) = std::fs::remove_file(&path) { event!(