mirror of
https://github.com/onedr0p/exportarr.git
synced 2026-02-06 10:57:32 +00:00
Uses config command name instead of os.Args
This commit is contained in:
parent
aebd0de203
commit
d1f1fa2ef0
@ -7,7 +7,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
@ -35,7 +34,7 @@ func NewClient(c *cli.Context) *Client {
|
||||
func (c *Client) DoRequest(endpoint string, target interface{}) error {
|
||||
apiVersion := "v3"
|
||||
|
||||
if len(os.Args) > 1 && os.Args[1] == "lidarr" {
|
||||
if c.config.Command.Name == "lidarr" {
|
||||
apiVersion = "v1"
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user