Compare commits

...

2 Commits

Author SHA1 Message Date
2c2f35ff0a Fix mixed up placeholders for new song window input boxes 2026-01-11 21:18:04 +02:00
2aa0e5a1e8 Change behavour when tool is missing
Dont die when tool is missing
2026-01-11 21:17:36 +02:00
3 changed files with 10 additions and 8 deletions

View File

@ -55,7 +55,9 @@ impl Cache {
} }
} }
} }
anyhow::bail!("Tool {} was not found", tool_path) // anyhow::bail!("Tool {} was not found", tool_path)
log::error!("Tool {tool_path:?} doesnt exist!");
Ok(())
} }
pub fn init(&mut self) -> Result<Receiver<Message>> { pub fn init(&mut self) -> Result<Receiver<Message>> {
// Check for missing tooling // Check for missing tooling

View File

@ -25,7 +25,7 @@ impl CompUi for SongList {
let mut sl = SongList::get()?; let mut sl = SongList::get()?;
sl.playable_songs = Self::get_playable_songs(&songs)?; sl.playable_songs = Self::get_playable_songs(&songs)?;
if let Some((sid, _)) = songs.first() { if let Some((sid, _)) = songs.first() {
if sl.selected_sid == Default::default() { if sl.selected_sid.eq(&uuid::Uuid::default()) {
sl.selected_sid = (*sid).clone(); sl.selected_sid = (*sid).clone();
} }
} }

View File

@ -99,8 +99,8 @@ impl Window for NewSongW {
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.add_space(3.0); ui.add_space(3.0);
if ui.button("Close").clicked() { if ui.button("Close").clicked() {
self.author = String::from("New Song"); self.author = String::from("Unknown");
self.name = String::from("Unknown"); self.name = String::from("New Song");
self.source_t = SourceType::Youtube; self.source_t = SourceType::Youtube;
self.source_url = String::default(); self.source_url = String::default();
state.windows.toggle(&WindowId::NewSong, false); state.windows.toggle(&WindowId::NewSong, false);
@ -112,15 +112,15 @@ impl Window for NewSongW {
s.set_author(&self.author); s.set_author(&self.author);
state.manifest.store_mut().get_songs_mut().insert(uuid::Uuid::new_v4(), s); state.manifest.store_mut().get_songs_mut().insert(uuid::Uuid::new_v4(), s);
self.author = String::from("New Song"); self.author = String::from("Unknown");
self.name = String::from("Unknown"); self.name = String::from("New Song");
self.source_t = SourceType::Youtube; self.source_t = SourceType::Youtube;
self.source_url = String::default(); self.source_url = String::default();
} }
if ui.button("Cancel").clicked() { if ui.button("Cancel").clicked() {
self.author = String::from("New Song"); self.author = String::from("Unknown");
self.name = String::from("Unknown"); self.name = String::from("New Song");
self.source_t = SourceType::Youtube; self.source_t = SourceType::Youtube;
self.source_url = String::default(); self.source_url = String::default();
state.windows.toggle(&WindowId::NewSong, false); state.windows.toggle(&WindowId::NewSong, false);