mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
Merge branch 'master' into old-engine
This commit is contained in:
@@ -2,12 +2,14 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/url"
|
||||
"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{}
|
||||
|
||||
@@ -66,7 +66,8 @@ func BasicAuth(accounts gin.Accounts) gin.HandlerFunc {
|
||||
if strings.HasPrefix(c.FullPath(), "/stream") ||
|
||||
c.FullPath() == "/site.webmanifest" ||
|
||||
// https://github.com/YouROK/TorrServer/issues/172
|
||||
(strings.HasPrefix(c.FullPath(), "/play") && c.FullPath() != "/playlistall/all.m3u") {
|
||||
(strings.HasPrefix(c.FullPath(), "/play") && c.FullPath() != "/playlistall/all.m3u") ||
|
||||
(settings.SearchWA && strings.HasPrefix(c.FullPath(), "/search")) {
|
||||
c.Set("not_auth", true)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user