fix(baidu_netdisk): hash and error 2
(#5356)
* fix(baidu):hash and error:2 * fix:invalid memory address
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user