File tree Expand file tree Collapse file tree 4 files changed +8
-14
lines changed
Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,11 @@ uuid = { version = "^0", features = ["v4"] }
5252unicode-width = " ^0"
5353unicode-segmentation = " ^1"
5454xdg = " ^2"
55-
56- [target .'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))' .dependencies ]
57- cpal = { features = [ " jack" ], version = " ^0" }
58- # pipewire = { optional = true, version = "^0" }
59-
60- [target .'cfg(target_os = "windows")' .dependencies ]
61- cpal = " ^0"
62-
63- [target .'cfg(any(target_os = "macos", target_os = "ios"))' .dependencies ]
6455cpal = " ^0"
56+ # pipewire = { optional = true, version = "^0" }
6557
6658[features ]
6759default = [ " devicons" ]
6860devicons = [ " phf" ]
61+ jack = [ " cpal/jack" ]
62+ mouse = []
Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ pub fn handle_client(
5454 let response = ClientRequest :: ClientLeave {
5555 uuid : uuid. to_string ( ) ,
5656 } ;
57- let json = serde_json:: to_string ( & response) .
58- expect ( "Failed to serialize ClientRequest" ) ;
57+ let json = serde_json:: to_string ( & response) . expect ( "Failed to serialize ClientRequest" ) ;
5958 let _ = event_tx_clone. send ( ClientMessage :: Client ( json) ) ;
6059 } ) ;
6160
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ fn default_audio_system_string() -> String {
4747fn str_to_cpal_hostid ( s : & str ) -> Option < cpal:: HostId > {
4848 match s {
4949 "alsa" => Some ( cpal:: HostId :: Alsa ) ,
50+ #[ cfg( feature = "jack" ) ]
5051 "jack" => Some ( cpal:: HostId :: Jack ) ,
5152 _ => None ,
5253 }
Original file line number Diff line number Diff line change 11use rand:: prelude:: SliceRandom ;
2- use rand:: thread_rng ;
2+ use rand:: rng ;
33
44use dizi:: song:: DiziSongEntry ;
55
@@ -95,15 +95,15 @@ impl DiziPlaylistTrait for DiziPlaylist {
9595 let entry_index = entry. entry_index ;
9696 let mut new_shuffle_order: Vec < usize > =
9797 ( 0 ..self . len ( ) ) . filter ( |i| * i != entry_index) . collect ( ) ;
98- new_shuffle_order. shuffle ( & mut thread_rng ( ) ) ;
98+ new_shuffle_order. shuffle ( & mut rng ( ) ) ;
9999 new_shuffle_order. insert ( 0 , entry_index) ;
100100
101101 self . order = new_shuffle_order;
102102 self . order_index = Some ( 0 ) ;
103103 }
104104 None => {
105105 let mut new_shuffle_order: Vec < usize > = ( 0 ..self . len ( ) ) . collect ( ) ;
106- new_shuffle_order. shuffle ( & mut thread_rng ( ) ) ;
106+ new_shuffle_order. shuffle ( & mut rng ( ) ) ;
107107 self . order = new_shuffle_order;
108108 }
109109 }
You can’t perform that action at this time.
0 commit comments