Skip to content

Commit

Permalink
closed #44, also fixed the table up a little bit, and made behaviours…
Browse files Browse the repository at this point in the history
… regarding playing / seeking better
  • Loading branch information
nednoodlehead committed Jun 3, 2024
1 parent ae0a28b commit fa63106
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/gui/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ impl Application for App {
data.author, data.title, data.album
);
self.current_song.store(Arc::new(data));
// should we reset the scrubbing bar?
Command::none()
}
Self::Message::VolumeChange(val) => {
Expand Down Expand Up @@ -458,6 +457,9 @@ impl Application for App {
Self::Message::SongFound(obj_or_err) => {
match obj_or_err {
Ok(obj) => {
if self.is_paused {
self.is_paused = false;
}
self.sender
.as_ref()
.unwrap()
Expand Down Expand Up @@ -498,6 +500,8 @@ impl Application for App {
.unwrap()
.send(PungeCommand::ChangeSong(song))
.unwrap();
// reset scrubber on successful song change!
self.scrubber = 0;
Command::none()
}
Self::Message::ChangeViewingPlaylist(playlist) => {
Expand Down
1 change: 1 addition & 0 deletions src/gui/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ impl App {
music_obj.sink.set_volume((val as f32) / 80.0)
}
PungeCommand::ChangeSong(uuid) => {
println!("here?");
let index = music_obj
.list
.iter()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<'a> table::Column<'a, ProgramCommands, Theme, Renderer> for Column {
ColumnKind::Author => text("Author").into(),
ColumnKind::Title => text("Title").into(),
ColumnKind::Album => text("Album").into(),
ColumnKind::Edit => button(text("eeee"))
ColumnKind::Edit => button(text("edit").size(10))
.width(100)
.height(100)
.on_press(ProgramCommands::OpenSongEditPage)
Expand Down

0 comments on commit fa63106

Please sign in to comment.