From dd4dbcacac989f3aa70a9ee6b9c2372cab52dc06 Mon Sep 17 00:00:00 2001 From: dezhishen <26274059+dezhishen@users.noreply.github.com> Date: Fri, 1 Aug 2025 15:20:53 +0800 Subject: [PATCH] fix: skip blank url when addOfflineDownload --- server/handles/offline_download.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/handles/offline_download.go b/server/handles/offline_download.go index 956c6b040..a75b11c14 100644 --- a/server/handles/offline_download.go +++ b/server/handles/offline_download.go @@ -1,6 +1,8 @@ package handles import ( + "strings" + _115 "github.com/OpenListTeam/OpenList/v4/drivers/115" _115_open "github.com/OpenListTeam/OpenList/v4/drivers/115_open" "github.com/OpenListTeam/OpenList/v4/drivers/pikpak" @@ -406,6 +408,9 @@ func AddOfflineDownload(c *gin.Context) { } var tasks []task.TaskExtensionInfo for _, url := range req.Urls { + if strings.TrimSpace(url) == "" { + continue + } t, err := tool.AddURL(c, &tool.AddURLArgs{ URL: url, DstDirPath: reqPath,