mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
Add support for using freeleech tokens if available
This commit is contained in:
parent
74f777340e
commit
3656a68a27
28 changed files with 199 additions and 39 deletions
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
type IndexerApiClient interface {
|
||||
GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error)
|
||||
GetTorrentByID(ctx context.Context, torrentID string, freeleechToken bool) (*domain.TorrentBasic, error)
|
||||
TestAPI(ctx context.Context) (bool, error)
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ func NewMockClient(apiKey string, opts ...OptFunc) IndexerApiClient {
|
|||
return c
|
||||
}
|
||||
|
||||
func (c *IndexerClient) GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error) {
|
||||
func (c *IndexerClient) GetTorrentByID(ctx context.Context, torrentID string, freeleechToken bool) (*domain.TorrentBasic, error) {
|
||||
if torrentID == "" {
|
||||
return nil, errors.New("mock client: must have torrentID")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue