mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Added context to the crunchyroll struct
This commit is contained in:
parent
a6c14cb6c9
commit
ac7904668f
3 changed files with 12 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ package crunchyroll
|
|||
|
||||
import (
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Subtitle struct {
|
||||
|
|
@ -13,7 +14,12 @@ type Subtitle struct {
|
|||
}
|
||||
|
||||
func (s Subtitle) Save(writer io.Writer) error {
|
||||
resp, err := s.crunchy.Client.Get(s.URL)
|
||||
req, err := http.NewRequestWithContext(s.crunchy.Context, http.MethodGet, s.URL, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err := s.crunchy.Client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue