mirror of https://github.com/Xhofe/alist
fix(local): incorrect path of thumbnail (for 6453ae0
)
parent
8b523fab8b
commit
9d9377f65d
|
@ -69,9 +69,9 @@ func (d *Local) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([
|
||||||
}
|
}
|
||||||
thumb := ""
|
thumb := ""
|
||||||
if d.Thumbnail && utils.GetFileType(f.Name()) == conf.IMAGE {
|
if d.Thumbnail && utils.GetFileType(f.Name()) == conf.IMAGE {
|
||||||
thumb = common.GetApiUrl(nil) + stdpath.Join("/d", utils.GetFullPath(d.MountPath, fullPath), f.Name())
|
thumb = common.GetApiUrl(nil) + stdpath.Join("/d", args.ReqPath, f.Name())
|
||||||
thumb = utils.EncodePath(thumb, true)
|
thumb = utils.EncodePath(thumb, true)
|
||||||
thumb += "?type=thumb&sign=" + sign.Sign(stdpath.Join(utils.GetFullPath(d.MountPath, fullPath), f.Name()))
|
thumb += "?type=thumb&sign=" + sign.Sign(stdpath.Join(args.ReqPath, f.Name()))
|
||||||
}
|
}
|
||||||
isFolder := f.IsDir() || isSymlinkDir(f, fullPath)
|
isFolder := f.IsDir() || isSymlinkDir(f, fullPath)
|
||||||
var size int64
|
var size int64
|
||||||
|
|
|
@ -23,7 +23,7 @@ func list(ctx context.Context, path string, refresh ...bool) ([]model.Obj, error
|
||||||
var _objs []model.Obj
|
var _objs []model.Obj
|
||||||
if storage != nil {
|
if storage != nil {
|
||||||
_objs, err = op.List(ctx, storage, actualPath, model.ListArgs{
|
_objs, err = op.List(ctx, storage, actualPath, model.ListArgs{
|
||||||
//ReqPath: path,
|
ReqPath: path,
|
||||||
}, refresh...)
|
}, refresh...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("%+v", err)
|
log.Errorf("%+v", err)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type ListArgs struct {
|
type ListArgs struct {
|
||||||
//ReqPath string
|
ReqPath string
|
||||||
}
|
}
|
||||||
|
|
||||||
type LinkArgs struct {
|
type LinkArgs struct {
|
||||||
|
|
Loading…
Reference in New Issue