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,