setdevice
This commit is contained in:
parent
e88a964b3a
commit
1747097e7a
@ -1,6 +1,7 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -213,9 +214,14 @@ func Run(c *commands.Commander, s fx.Shutdowner) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "setdevice",
|
Name: "setdevice",
|
||||||
Usage: "Set the active device",
|
Usage: "Set the active device",
|
||||||
|
Args: true,
|
||||||
|
ArgsUsage: "<device_id>",
|
||||||
Action: func(cCtx *cli.Context) error {
|
Action: func(cCtx *cli.Context) error {
|
||||||
|
if cCtx.NArg() == 0 {
|
||||||
|
return fmt.Errorf("no device id provided")
|
||||||
|
}
|
||||||
return c.SetDevice(spotify.ID(cCtx.Args().First()))
|
return c.SetDevice(spotify.ID(cCtx.Args().First()))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user