remove useless comments

This commit is contained in:
Erica Z 2024-11-19 21:57:55 +01:00
parent 8ccf9cfccb
commit 411e690e65

View file

@ -140,86 +140,6 @@ impl Player {
object_server
.interface::<_, Self>("/org/mpris/MediaPlayer2")
.await
/*
playbin.connect_new_track(glib::clone!(
#[strong]
player_ref,
move |_, song| {
let metadata = MetadataMap::from_playbin_song(Some(song));
let player_ref = player_ref.clone();
glib::spawn_future_local(async move {
let mut player = player_ref.get_mut().await;
player.metadata = metadata;
player
.metadata_changed(player_ref.signal_emitter())
.await
.unwrap();
});
}
));
playbin.connect_seeked(glib::clone!(
#[strong]
player_ref,
move |_, position| {
let player_ref = player_ref.clone();
glib::spawn_future_local(async move {
player_ref
.seeked((position * MICROSECONDS) as i64)
.await
.unwrap();
});
}
));
playbin.connect_notify_future_local(
"play-queue-length",
glib::clone!(
#[strong]
player_ref,
move |_, _| {
let player_ref = player_ref.clone();
async move {
let player = player_ref.get_mut().await;
// properties that depend on the play queue length
player
.can_go_next_changed(player_ref.signal_emitter())
.await
.unwrap();
player
.can_go_previous_changed(player_ref.signal_emitter())
.await
.unwrap();
player
.can_play_changed(player_ref.signal_emitter())
.await
.unwrap();
}
}
),
);
playbin.connect_notify_future_local(
"state",
glib::clone!(
#[strong]
player_ref,
move |_, _| {
let player_ref = player_ref.clone();
async move {
let player = player_ref.get_mut().await;
// properties that depend on the playbin state
player
.playback_status_changed(player_ref.signal_emitter())
.await
.unwrap();
}
}
),
);
*/
}
pub async fn on_playlist_count_changed(