feat(google_photo): Add categories in root, add album support. (#2046)

* feat(google_photo): Add categories in root, add album support.

* fix(google_photo): Remove else block in `drive/google_photo/types.go:60`
This commit is contained in:
Jake Liu
2022-10-18 15:19:05 +08:00
committed by GitHub
parent 45cc0cedbd
commit 3db798a82a
4 changed files with 137 additions and 39 deletions

View File

@ -43,7 +43,7 @@ func (d *GooglePhoto) Drop(ctx context.Context) error {
}
func (d *GooglePhoto) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) {
files, err := d.getFiles()
files, err := d.getFiles(dir.GetID())
if err != nil {
return nil, err
}
@ -58,7 +58,7 @@ func (d *GooglePhoto) List(ctx context.Context, dir model.Obj, args model.ListAr
//}
func (d *GooglePhoto) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error) {
f, err := d.getFile(file.GetID())
f, err := d.getMedia(file.GetID())
if err != nil {
return nil, err
}