mirror of https://github.com/Xhofe/alist
🐛 fix 189 size and time
parent
4466cb19a5
commit
8987958e26
|
@ -85,8 +85,14 @@ func (c Cloud189) FormatFile(file *Cloud189File) *model.File {
|
||||||
Thumbnail: file.Icon.SmallUrl,
|
Thumbnail: file.Icon.SmallUrl,
|
||||||
Url: file.Url,
|
Url: file.Url,
|
||||||
}
|
}
|
||||||
|
loc, _ := time.LoadLocation("Local")
|
||||||
|
lastOpTime, err := time.ParseInLocation("2006-01-02 15:04:05", file.LastOpTime, loc)
|
||||||
|
if err == nil {
|
||||||
|
f.UpdatedAt = &lastOpTime
|
||||||
|
}
|
||||||
if file.Size == -1 {
|
if file.Size == -1 {
|
||||||
f.Type = conf.FOLDER
|
f.Type = conf.FOLDER
|
||||||
|
f.Size = 0
|
||||||
} else {
|
} else {
|
||||||
f.Type = utils.GetFileType(filepath.Ext(file.Name))
|
f.Type = utils.GetFileType(filepath.Ext(file.Name))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue