rate-current CLI option (#847)

This commit is contained in:
Drew Weymouth
2026-02-07 10:18:51 -08:00
committed by GitHub
parent 3c46889014
commit b52aa5b36f
5 changed files with 54 additions and 3 deletions
+5
View File
@@ -27,6 +27,7 @@ const (
VolumeAdjustPath = "/volume/adjust" // ?pct=<+/- percentage>
ShowPath = "/window/show"
QuitPath = "/window/quit"
RateCurrentTrackPath = "/current_track/rate" // ?r=<rating 0-5>
)
type Response struct {
@@ -76,3 +77,7 @@ func BuildSearchTrackPath(search string) string {
s := url.QueryEscape(search)
return fmt.Sprintf("%s?s=%s", SearchTrackPath, s)
}
func BuildRateCurrentTrackPath(rating int) string {
return fmt.Sprintf("%s?r=%d", RateCurrentTrackPath, rating)
}