Skip to content

Commit

Permalink
Fix for lyrics without timestamp (#545)
Browse files Browse the repository at this point in the history
Co-authored-by: so9010 <so9010sami@gmail.com>
  • Loading branch information
SO9010 and so9010 authored Oct 17, 2024
1 parent a6e575c commit b3c56fd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions psst-gui/src/ui/lyrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ fn track_lyrics_widget() -> impl Widget<AppState> {
.link()
.rounded(theme::BUTTON_BORDER_RADIUS)
.on_left_click(|ctx, _, c, _| {
ctx.submit_command(
cmd::SKIP_TO_POSITION
.with(c.data.start_time_ms.parse::<u64>().unwrap()),
)
if c.data.start_time_ms.parse::<u64>().unwrap() != 0 {
ctx.submit_command(
cmd::SKIP_TO_POSITION.with(c.data.start_time_ms.parse::<u64>().unwrap())
)
}
})
})
},
Expand All @@ -91,4 +92,4 @@ fn track_lyrics_widget() -> impl Widget<AppState> {
|_, data, _| data.lyrics.defer(()),
|_, data, r| data.lyrics.update(((), r.1)),
)
}
}

0 comments on commit b3c56fd

Please sign in to comment.