Skip to content

Commit

Permalink
fix: solve 00:00 error
Browse files Browse the repository at this point in the history
  • Loading branch information
pandeyanup committed Feb 11, 2024
1 parent 63a6b1f commit 449fca7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/key_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ pub fn handle_key_event(app: &mut App) -> Result<bool> {
.arg(url)
.arg("--no-video")
.arg("--force-window=no")
.arg("{ 'command': [ 'seek', '0', 'absolute' ] }")
.arg("--input-ipc-server=/tmp/mpvsocket")
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.spawn()
.expect("mpv failed to start"),
);
let mut stream = UnixStream::connect("/tmp/mpvsocket").unwrap();
write!(stream, "{{\"command\":[\"seek\", \"0\", \"absolute\"]}}\n")
.unwrap();
app.is_playing = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub fn run_ui(mut app: App) -> io::Result<()> {
)
};
let statusbar = Span::styled(
format!("vol: {} loop: {}", app.volume, app.looping.to_string()),
format!("vol: {} | loop: {}", app.volume, app.looping.to_string()),
Style::default().fg(Color::Green),
)
.to_right_aligned_line();
Expand Down

0 comments on commit 449fca7

Please sign in to comment.