change api ffprobe link

This commit is contained in:
nikk gitanes
2023-03-02 09:45:13 +03:00
parent 56f082e65d
commit 41a064d775

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"net/http"
"server/ffprobe"
settings2 "server/settings"
sets "server/settings"
"github.com/gin-gonic/gin"
)
@@ -19,9 +19,9 @@ func ffp(c *gin.Context) {
return
}
host := "http://127.0.0.1:" + settings2.Port + "/stream?link=" + hash + "&index=" + indexStr + "&play"
link := "http://127.0.0.1:" + sets.Port + "/play/" + hash + "/" + indexStr
data, err := ffprobe.ProbeUrl(host)
data, err := ffprobe.ProbeUrl(link)
if err != nil {
c.AbortWithError(http.StatusBadRequest, fmt.Errorf("error getting data: %v", err))
return