remove status after send file

This commit is contained in:
YouROK
2021-04-15 10:18:24 +03:00
parent dfbbad21d0
commit a45680416a

View File

@@ -10,12 +10,13 @@ import (
"strings" "strings"
"time" "time"
"github.com/anacrolix/missinggo/httptoo"
sets "server/settings" sets "server/settings"
"server/torr" "server/torr"
"server/torr/state" "server/torr/state"
"server/utils" "server/utils"
"github.com/anacrolix/missinggo/httptoo"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/pkg/errors" "github.com/pkg/errors"
) )
@@ -78,7 +79,6 @@ func sendM3U(c *gin.Context, name, hash string, m3u string) {
} }
c.Header("Content-Disposition", `attachment; filename="`+name+`"`) c.Header("Content-Disposition", `attachment; filename="`+name+`"`)
http.ServeContent(c.Writer, c.Request, name, time.Now(), bytes.NewReader([]byte(m3u))) http.ServeContent(c.Writer, c.Request, name, time.Now(), bytes.NewReader([]byte(m3u)))
c.Status(200)
} }
func getM3uList(tor *state.TorrentStatus, host string, fromLast bool) string { func getM3uList(tor *state.TorrentStatus, host string, fromLast bool) string {