mirror of https://github.com/Xhofe/alist
parent
7e6522c81e
commit
71e4e1ab6e
|
@ -139,7 +139,7 @@ type File struct {
|
||||||
Topsort int `json:"topsort"`
|
Topsort int `json:"topsort"`
|
||||||
Restype string `json:"restype"`
|
Restype string `json:"restype"`
|
||||||
Size int_str `json:"size"`
|
Size int_str `json:"size"`
|
||||||
UploadDate string `json:"uploadDate"`
|
UploadDate int64 `json:"uploadDate"`
|
||||||
FileSize string `json:"fileSize"`
|
FileSize string `json:"fileSize"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
FileID string `json:"fileId"`
|
FileID string `json:"fileId"`
|
||||||
|
@ -265,10 +265,7 @@ func fileToObj(f File) *model.Object {
|
||||||
IsFolder: true,
|
IsFolder: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
paserTime, err := time.Parse("2006-01-02 15:04", f.Content.UploadDate)
|
paserTime := time.UnixMilli(f.Content.UploadDate)
|
||||||
if err != nil {
|
|
||||||
paserTime = time.Now()
|
|
||||||
}
|
|
||||||
return &model.Object{
|
return &model.Object{
|
||||||
ID: fmt.Sprintf("%d$%s", f.ID, f.Content.FileID),
|
ID: fmt.Sprintf("%d$%s", f.ID, f.Content.FileID),
|
||||||
Name: f.Content.Name,
|
Name: f.Content.Name,
|
||||||
|
|
Loading…
Reference in New Issue