subsonic-tui/vendor/github.com/delucks/go-subsonic/scanning.go
Sagi Dayan 48661005be
initial commit
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2024-09-01 16:30:56 +03:00

19 lines
473 B
Go

package subsonic
// GetScanStatus returns the current status for media library scanning.
func (c *Client) GetScanStatus() (*ScanStatus, error) {
resp, err := c.Get("getScanStatus", nil)
if err != nil {
return nil, err
}
return resp.ScanStatus, nil
}
// StartScan initiates a rescan of the media libraries.
func (c *Client) StartScan() (*ScanStatus, error) {
resp, err := c.Get("startScan", nil)
if err != nil {
return nil, err
}
return resp.ScanStatus, nil
}