mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
21 lines
311 B
Go
21 lines
311 B
Go
package api
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"server/rutor"
|
|
"server/rutor/models"
|
|
)
|
|
|
|
func rutorSearch(c *gin.Context) {
|
|
query := c.Query("query")
|
|
query, _ = url.QueryUnescape(query)
|
|
list := rutor.Search(query)
|
|
if list == nil {
|
|
list = []*models.TorrentDetails{}
|
|
}
|
|
c.JSON(200, list)
|
|
}
|