Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Removed no longer used AuthTokenResponse struct and readURL func
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarbuzzi committed Jan 15, 2021
1 parent f8db4e1 commit 7124aaf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
6 changes: 0 additions & 6 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ func isValidFilename(fn string) bool {
return true
}

// AuthTokenResponse represents the (happy) JSON response to a token request call
type AuthTokenResponse struct {
Sig string `json:"sig"`
Token string `json:"token"`
}

// Chunk represents a video chunk from the m3u
type Chunk struct {
Name string
Expand Down
22 changes: 0 additions & 22 deletions tvd.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,25 +574,3 @@ func secondsToTimeMask(s int) string {
log.Printf("masked %d seconds as '%s'\n", s, res)
return res
}

func readURL(url string) ([]byte, error) {
log.Printf("requesting URL: %s\n", url)
resp, err := http.Get(url)
if err != nil {
return nil, err
}
defer func() {
err = resp.Body.Close()
if err != nil {
fmt.Printf("error closing URL body for <%s>: %s", url, err.Error())
log.Println(err)
}
}()

body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}

return body, nil
}

0 comments on commit 7124aaf

Please sign in to comment.