fix(baidu_netdisk): hash and error 2 (#5356)

* fix(baidu):hash and error:2

* fix:invalid memory address
This commit is contained in:
foxxorcat
2023-10-10 18:08:27 +08:00
committed by GitHub
parent 35d672217d
commit 8ef89ad0a4
5 changed files with 92 additions and 41 deletions

View File

@ -1,14 +1,15 @@
package model
import (
"github.com/alist-org/alist/v3/pkg/http_range"
"github.com/alist-org/alist/v3/pkg/utils"
"io"
"regexp"
"sort"
"strings"
"time"
"github.com/alist-org/alist/v3/pkg/http_range"
"github.com/alist-org/alist/v3/pkg/utils"
mapset "github.com/deckarep/golang-set/v2"
"github.com/maruel/natural"
@ -146,6 +147,20 @@ func GetUrl(obj Obj) (url string, ok bool) {
return url, false
}
func GetRawObject(obj Obj) *Object {
switch v := obj.(type) {
case *ObjThumbURL:
return &v.Object
case *ObjThumb:
return &v.Object
case *ObjectURL:
return &v.Object
case *Object:
return v
}
return nil
}
// Merge
func NewObjMerge() *ObjMerge {
return &ObjMerge{