@@ -32,7 +32,6 @@ pub mod imp {
3232 } ,
3333 subclass:: prelude:: * ,
3434 } ;
35- #[ cfg( target_os = "linux" ) ]
3635 use mpris_server:: LocalServer ;
3736 use once_cell:: sync:: * ;
3837 use tracing:: {
@@ -101,7 +100,6 @@ pub mod imp {
101100 pub repeat_mode : Cell < ListRepeatMode > ,
102101 #[ property( get, set, default_value = false ) ]
103102 pub gapless : RefCell < bool > ,
104- #[ cfg( target_os = "linux" ) ]
105103 pub mpris_server : OnceCell < LocalServer < super :: MusicPlayer > > ,
106104 }
107105
@@ -117,7 +115,6 @@ pub mod imp {
117115 let pipeline = gst:: ElementFactory :: make ( "playbin3" ) . build ( ) . unwrap ( ) ;
118116
119117 // Initialize the mpris server
120- #[ cfg( target_os = "linux" ) ]
121118 glib:: spawn_future_local ( glib:: clone!(
122119 #[ weak( rename_to = imp) ]
123120 self ,
@@ -450,27 +447,22 @@ pub mod imp {
450447 pub fn notify_song_changed ( & self ) {
451448 let has_prev = self . prev_song ( ) . is_some ( ) ;
452449 let has_next = self . next_song ( ) . is_some ( ) ;
453- #[ cfg( target_os = "linux" ) ]
454450 self . obj ( ) . notify_mpris_song_changed ( has_prev, has_next) ;
455451 }
456452
457453 pub fn notify_playing ( & self ) {
458- #[ cfg( target_os = "linux" ) ]
459454 self . obj ( ) . notify_mpris_playing ( ) ;
460455 }
461456
462457 pub fn notify_paused ( & self ) {
463- #[ cfg( target_os = "linux" ) ]
464458 self . obj ( ) . notify_mpris_paused ( ) ;
465459 }
466460
467461 pub fn notify_stopped ( & self ) {
468- #[ cfg( target_os = "linux" ) ]
469462 self . obj ( ) . notify_mpris_stopped ( ) ;
470463 }
471464
472465 pub fn notify_seeked ( & self , position : i64 ) {
473- #[ cfg( target_os = "linux" ) ]
474466 self . obj ( ) . notify_mpris_seeked ( position) ;
475467 }
476468 }
0 commit comments