add -seek-by CLI arg

This commit is contained in:
Drew Weymouth
2024-06-23 16:09:50 -07:00
parent 46b7e386f4
commit 17dfa1132f
7 changed files with 44 additions and 10 deletions
+5
View File
@@ -11,6 +11,7 @@ const (
PreviousPath = "/transport/previous"
NextPath = "/transport/next"
TimePosPath = "/transport/timepos" // ?s=<seconds>
SeekByPath = "/transport/seek-by" // ?s=<+/- seconds>
VolumePath = "/volume" // ?v=<vol>
ShowPath = "/window/show"
QuitPath = "/window/quit"
@@ -27,3 +28,7 @@ func SetVolumePath(vol int) string {
func SeekToSecondsPath(secs float64) string {
return fmt.Sprintf("%s?s=%0.2f", TimePosPath, secs)
}
func SeekBySecondsPath(secs float64) string {
return fmt.Sprintf("%s?s=%0.2f", SeekByPath, secs)
}