feat(downloadclient): set downloadClientId for arr clients (#1081)

feat(downloadclient): arrs set downloadClientId
This commit is contained in:
ze0s 2023-09-03 15:34:55 +02:00 committed by GitHub
parent 1bfbe38335
commit 0d3e10f094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 154 additions and 66 deletions

View file

@ -61,6 +61,7 @@ func New(config Config) Client {
type Release struct {
Title string `json:"title"`
InfoUrl string `json:"infoUrl,omitempty"`
DownloadUrl string `json:"downloadUrl,omitempty"`
MagnetUrl string `json:"magnetUrl,omitempty"`
Size int64 `json:"size"`
@ -68,6 +69,7 @@ type Release struct {
DownloadProtocol string `json:"downloadProtocol"`
Protocol string `json:"protocol"`
PublishDate string `json:"publishDate"`
DownloadClientId int `json:"downloadClientId,omitempty"`
}
type PushResponse struct {
@ -90,7 +92,7 @@ type BadRequestResponse struct {
}
func (r *BadRequestResponse) String() string {
return fmt.Sprintf("[%v: %v] %v: %v - got value: %v", r.Severity, r.ErrorCode, r.PropertyName, r.ErrorMessage, r.AttemptedValue)
return fmt.Sprintf("[%s: %s] %s: %s - got value: %s", r.Severity, r.ErrorCode, r.PropertyName, r.ErrorMessage, r.AttemptedValue)
}
func (c *client) Test(ctx context.Context) (*SystemStatusResponse, error) {