mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
feat(drivers): expose MD5/SHA1 hashes in misskey and quark_open file listing
This commit is contained in:
@@ -245,6 +245,7 @@ func mFile2Object(file MFile) *model.ObjThumbURL {
|
||||
Ctime: ctime,
|
||||
IsFolder: false,
|
||||
Size: file.Size,
|
||||
HashInfo: utils.NewHashInfo(utils.MD5, file.MD5),
|
||||
},
|
||||
Thumbnail: model.Thumbnail{
|
||||
Thumbnail: file.ThumbnailURL,
|
||||
|
||||
@@ -2,6 +2,7 @@ package quark_open
|
||||
|
||||
import (
|
||||
"github.com/OpenListTeam/OpenList/v4/internal/model"
|
||||
"github.com/OpenListTeam/OpenList/v4/pkg/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -57,6 +58,7 @@ func fileToObj(f File) *model.ObjThumb {
|
||||
Modified: time.UnixMilli(f.UpdatedAt),
|
||||
IsFolder: f.FileType == "0",
|
||||
Ctime: time.UnixMilli(f.CreatedAt),
|
||||
HashInfo: utils.NewHashInfo(utils.SHA1, f.ContentHash),
|
||||
},
|
||||
Thumbnail: model.Thumbnail{Thumbnail: f.ThumbnailURL},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user