mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 05:56:10 +05:00
add unescape link
This commit is contained in:
@@ -487,6 +487,13 @@ func torrentPlay(c echo.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
magnet, infoBytes, err := helpers.GetMagnet(link)
|
magnet, infoBytes, err := helpers.GetMagnet(link)
|
||||||
|
if err != nil {
|
||||||
|
link, er := url.QueryUnescape(link)
|
||||||
|
if er == nil {
|
||||||
|
magnet, infoBytes, err = helpers.GetMagnet(link)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error get magnet:", link, err)
|
fmt.Println("Error get magnet:", link, err)
|
||||||
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
|
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
|
||||||
|
|||||||
Reference in New Issue
Block a user