mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-14 20:33:41 +00:00
feat: support use server time for file creation (#359)
This commit is contained in:
20 files changed
+192
-75
No files matched your search
@@ -20,7 +20,8 @@ const (
|
||||
HttpHeaderContentLength = "Content-Length"
|
||||
HttpHeaderContentRange = "Content-Range"
|
||||
HttpHeaderContentDisposition = "Content-Disposition"
|
||||
HttpHeaderUserAgent = "Usr-Agent"
|
||||
HttpHeaderUserAgent = "User-Agent"
|
||||
HttpHeaderLastModified = "Last-Modified"
|
||||
|
||||
HttpHeaderBytes = "bytes"
|
||||
HttpHeaderRangeFormat = "bytes=%d-%d"
|
||||
|
||||
+5
-3
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/GopeedLab/gopeed/pkg/util"
|
||||
"golang.org/x/exp/slices"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Request download request
|
||||
@@ -59,9 +60,10 @@ func (r *Resource) CalcSize(selectFiles []int) {
|
||||
}
|
||||
|
||||
type FileInfo struct {
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Size int64 `json:"size"`
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Size int64 `json:"size"`
|
||||
Ctime *time.Time `json:"ctime"`
|
||||
|
||||
Req *Request `json:"req"`
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user