diff --git a/src/ui/play_queue.rs b/src/ui/play_queue.rs index 28cd2f2..a7f873d 100644 --- a/src/ui/play_queue.rs +++ b/src/ui/play_queue.rs @@ -89,7 +89,7 @@ mod imp { #[template_callback] fn on_row_activated(&self, position: u32) { - self.obj().window().play_index(position as i64); + self.obj().window().playlist_play_index(position as i64); } } diff --git a/src/ui/play_queue/song.rs b/src/ui/play_queue/song.rs index 6c26298..91fbd33 100644 --- a/src/ui/play_queue/song.rs +++ b/src/ui/play_queue/song.rs @@ -8,8 +8,8 @@ mod imp { #[template(resource = "/eu/callcc/audrey/play_queue_song.ui")] #[properties(wrapper_type = super::Song)] pub struct Song { - #[property(get, set = Self::set_playlist_pos)] - playlist_pos: Cell, + #[property(type = i64, set = Self::set_playlist_pos)] + _playlist_pos: (), #[property(set, get)] draggable: Cell, @@ -167,7 +167,6 @@ mod imp { } fn set_playlist_pos(&self, playlist_pos: i64) { - self.playlist_pos.set(playlist_pos); self.obj() .set_current(playlist_pos == self.position.get() as i64); } diff --git a/src/ui/window.rs b/src/ui/window.rs index 99c0912..1670bc8 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -390,7 +390,7 @@ impl Window { todo!() } - pub fn play_index(&self, index: i64) { + pub fn playlist_play_index(&self, index: i64) { self.imp() .mpv .command(["playlist-play-index", &index.to_string()])