mirror of
https://github.com/AlistGo/alist.git
synced 2025-06-04 17:04:42 +08:00
feat: local storage image thumbnail
This commit is contained in:
@ -6,9 +6,14 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type ListArgs struct {
|
||||
ReqPath string
|
||||
}
|
||||
|
||||
type LinkArgs struct {
|
||||
IP string
|
||||
Header http.Header
|
||||
Type string
|
||||
}
|
||||
|
||||
type Link struct {
|
||||
|
@ -28,8 +28,8 @@ type URL interface {
|
||||
URL() string
|
||||
}
|
||||
|
||||
type Thumbnail interface {
|
||||
Thumbnail() string
|
||||
type Thumb interface {
|
||||
Thumb() string
|
||||
}
|
||||
|
||||
type SetID interface {
|
||||
|
@ -10,26 +10,39 @@ type Object struct {
|
||||
IsFolder bool
|
||||
}
|
||||
|
||||
func (f Object) GetName() string {
|
||||
return f.Name
|
||||
func (o Object) GetName() string {
|
||||
return o.Name
|
||||
}
|
||||
|
||||
func (f Object) GetSize() int64 {
|
||||
return f.Size
|
||||
func (o Object) GetSize() int64 {
|
||||
return o.Size
|
||||
}
|
||||
|
||||
func (f Object) ModTime() time.Time {
|
||||
return f.Modified
|
||||
func (o Object) ModTime() time.Time {
|
||||
return o.Modified
|
||||
}
|
||||
|
||||
func (f Object) IsDir() bool {
|
||||
return f.IsFolder
|
||||
func (o Object) IsDir() bool {
|
||||
return o.IsFolder
|
||||
}
|
||||
|
||||
func (f Object) GetID() string {
|
||||
return f.ID
|
||||
func (o Object) GetID() string {
|
||||
return o.ID
|
||||
}
|
||||
|
||||
func (f *Object) SetID(id string) {
|
||||
f.ID = id
|
||||
func (o *Object) SetID(id string) {
|
||||
o.ID = id
|
||||
}
|
||||
|
||||
type Thumbnail struct {
|
||||
Thumbnail string
|
||||
}
|
||||
|
||||
func (t Thumbnail) Thumb() string {
|
||||
return t.Thumbnail
|
||||
}
|
||||
|
||||
type ObjectThumbnail struct {
|
||||
Object
|
||||
Thumbnail
|
||||
}
|
||||
|
Reference in New Issue
Block a user