Skip to content

Commit a1b73f8

Browse files
committed
Merge branch 'refs/heads/main' into taro/remember-last-visited-path-between-sessions
# Conflicts: # src/app.rs
2 parents e5f0252 + ab47a46 commit a1b73f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/app.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ impl<'a> App<'a> {
135135

136136
// if something playing, calculate progress
137137
} else if !self.music_handle.sink_empty() {
138-
// progress()
139-
self.music_handle.time_played() as f64 / self.music_handle.song_length() as f64
138+
f64::clamp(self.music_handle.time_played() as f64 / self.music_handle.song_length() as f64, 0.0, 1.0)
140139
// if nothing playing keep rolling
141140
} else {
142141
self.auto_play();

0 commit comments

Comments
 (0)