optimize itv

main
肥羊 1 year ago
parent ec765cb0d9
commit 982207c78d
  1. 4
      Golang/liveurls/itv.go

@ -225,13 +225,13 @@ type cacheEntry struct {
func (i *Itv) HandleMainRequest(c *gin.Context, cdn, id string) { func (i *Itv) HandleMainRequest(c *gin.Context, cdn, id string) {
key := cdn + "/" + id key := cdn + "/" + id
url, ok := programList[key] startUrl, ok := programList[key]
if !ok { if !ok {
c.String(http.StatusNotFound, "id not found!") c.String(http.StatusNotFound, "id not found!")
return return
} }
data, redirectURL, err := getHTTPResponse(url) data, redirectURL, err := getHTTPResponse(startUrl)
if err != nil { if err != nil {
c.String(http.StatusInternalServerError, err.Error()) c.String(http.StatusInternalServerError, err.Error())
return return

Loading…
Cancel
Save