From d9bfc97b599af4e4e96ae403df8287a533223e32 Mon Sep 17 00:00:00 2001 From: Felix Kaaman Date: Fri, 21 Feb 2020 23:24:55 +0200 Subject: Add seeking to audio player Adds a new "!seek" command which takes in a string that will be parsed by humantime in addition to a '+' or '-' character that can be prefixed to determine if it is a relative seek. Without any prefix characters the seek will be absolute. --- src/command.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/command.rs') diff --git a/src/command.rs b/src/command.rs index 3a39290..db22028 100644 --- a/src/command.rs +++ b/src/command.rs @@ -9,7 +9,8 @@ use structopt::StructOpt; DisableHelpFlags, DisableVersion, ColorNever, - NoBinaryName]",) + NoBinaryName, + AllowLeadingHyphen]",) )] pub enum Command { /// Adds url to playlist @@ -18,6 +19,8 @@ pub enum Command { Play, /// Pauses audio playback Pause, + /// Seeks by a specified amount + Seek { amount: String }, /// Stops audio playback Stop, /// Switches to the next queue entry -- cgit v1.2.3-70-g09d2