subsonic-tui/vendor/github.com/delucks/go-subsonic/scanning.go
Sagi Dayan 26e526f07e
initial commit
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2024-02-20 19:10:14 +02: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
}