fix(trainbit): decode html code (#3883)

pull/3888/head
Night Space 2023-03-19 15:25:06 +08:00 committed by GitHub
parent 023107226c
commit 3abe26473c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package trainbit
import (
"html"
"io"
"net/http"
"net/url"
@ -95,6 +96,7 @@ func local2provider(filename string, isFolder bool) string {
}
func provider2local(filename string) string {
filename = html.UnescapeString(filename)
index := strings.LastIndex(filename, ".delete_suffix")
if index != -1 {
filename = filename[:index]