File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131- [ core] Removed unsafe code (breaking)
3232- [ playback] Adhere to ReplayGain spec when calculating gain normalisation factor.
3333- [ playback] ` alsa ` : Use ` --volume-range ` overrides for softvol controls
34+ - [ connect] Don't panic when activating shuffle without previous interaction.
3435
3536### Removed
3637- [ playback] ` alsamixer ` : previously deprecated option ` mixer-card ` has been removed.
Original file line number Diff line number Diff line change @@ -668,15 +668,15 @@ impl SpircTask {
668668 self . state . set_shuffle ( frame. get_state ( ) . get_shuffle ( ) ) ;
669669 if self . state . get_shuffle ( ) {
670670 let current_index = self . state . get_playing_track_index ( ) ;
671- {
672- let tracks = self . state . mut_track ( ) ;
671+ let tracks = self . state . mut_track ( ) ;
672+ if ! tracks. is_empty ( ) {
673673 tracks. swap ( 0 , current_index as usize ) ;
674674 if let Some ( ( _, rest) ) = tracks. split_first_mut ( ) {
675675 let mut rng = rand:: thread_rng ( ) ;
676676 rest. shuffle ( & mut rng) ;
677677 }
678+ self . state . set_playing_track_index ( 0 ) ;
678679 }
679- self . state . set_playing_track_index ( 0 ) ;
680680 } else {
681681 let context = self . state . get_context_uri ( ) ;
682682 debug ! ( "{:?}" , context) ;
You can’t perform that action at this time.
0 commit comments