cosmetics

This commit is contained in:
nikk gitanes
2024-06-14 01:48:01 +03:00
parent 8dfb5ea687
commit 8347510013

View File

@@ -172,11 +172,6 @@ func streamNoAuth(c *gin.Context) {
_, m3u := c.GetQuery("m3u")
_, fromlast := c.GetQuery("fromlast")
_, play := c.GetQuery("play")
title := c.Query("title")
poster := c.Query("poster")
category := c.Query("category")
data := ""
if link == "" {
c.AbortWithError(http.StatusBadRequest, errors.New("link should not be empty"))
@@ -198,17 +193,22 @@ func streamNoAuth(c *gin.Context) {
return
}
title := c.Query("title")
if title == "" {
title = tor.Title
}
poster := c.Query("poster")
if poster == "" {
poster = tor.Poster
}
category := c.Query("category")
if category == "" {
category = tor.Category
}
data = tor.Data
data := tor.Data
if tor.Stat == state.TorrentInDB {
tor, err = torr.AddTorrent(spec, title, poster, data, category)
@@ -241,7 +241,6 @@ func streamNoAuth(c *gin.Context) {
if preload {
torr.Preload(tor, index)
}
// return m3u if query
if m3u {
name := strings.ReplaceAll(c.Param("fname"), `/`, "") // strip starting / from param