Repository: AlistGo/alist (language: go)

Issue:
一刻相册只删除相册中的照片 而并没有真实的在一刻相册中删除
### Please make sure of the following things

- [X] I have read the [documentation](https://alist.nn.ci).
- [ ] I'm sure there are no duplicate issues or discussions.
- [ ] I'm sure it's due to `alist` and not something else(such as `Dependencies` or `Operational`).
- [ ] I'm sure I'm using the latest version

### Alist Version / Alist 版本

v3.24.0

### Driver used / 使用的存储驱动

一刻相册

### Describe the bug / 问题描述

一刻相册只删除相册中的照片 而并没有真实的在一刻相册中删除

### Reproduction / 复现链接

一刻相册只删除相册中的照片 而并没有真实的在一刻相册中删除

### Logs / 日志

_No response_


Discussion / hints:
Thanks for opening your first issue here! Be sure to follow the issue template!

只是移出了相册 
如果删除了就会存在一个逻辑上的矛盾，两个相册存在同一个图片，当第一个相册删除了源文件，第二个相册的图片就会一起被删除
> 

所以能不能将删除设置为真实删除，再加一个移除相册的按钮
alist不是专门适配一刻相册的程序，不过可以在后台添加一个选项，删除相册图片时删除源文件

Fix patch:
diff --git a/drivers/baidu_photo/driver.go b/drivers/baidu_photo/driver.go
index 2a55939fe99..ff47d25f784 100644
--- a/drivers/baidu_photo/driver.go
+++ b/drivers/baidu_photo/driver.go
@@ -175,9 +175,9 @@ func (d *BaiduPhoto) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.
 }
 
 func (d *BaiduPhoto) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {
-	// 仅支持相册之间移动
 	if file, ok := srcObj.(*AlbumFile); ok {
-		if _, ok := dstDir.(*Album); ok {
+		switch dstDir.(type) {
+		case *Album, *Root: // albumfile -> root -> album or albumfile -> root
 			newObj, err := d.Copy(ctx, srcObj, dstDir)
 			if err != nil {
 				return nil, err
diff --git a/drivers/baidu_photo/help.go b/drivers/baidu_photo/help.go
index e9b9331b7e0..d689f81d05f 100644
--- a/drivers/baidu_photo/help.go
+++ b/drivers/baidu_photo/help.go
@@ -69,3 +69,10 @@ func renameAlbum(album *Album, newName string) *Album {
 		Mtime:      time.Now().Unix(),
 	}
 }
+
+func BoolToIntStr(b bool) string {
+	if b {
+		return "1"
+	}
+	return "0"
+}
diff --git a/drivers/baidu_photo/meta.go b/drivers/baidu_photo/meta.go
index 06ab60462fd..e562b54061d 100644
--- a/drivers/baidu_photo/meta.go
+++ b/drivers/baidu_photo/meta.go
@@ -10,6 +10,7 @@ type Addition struct {
 	ShowType     string `json:"show_type" type:"select" options:"root,root_only_album,root_only_file" default:"root"`
 	AlbumID      string `json:"album_id"`
 	//AlbumPassword string `json:"album_password"`
+	DeleteOrigin bool   `json:"delete_origin"`
 	ClientID     string `json:"client_id" required:"true" default:"iYCeC9g08h5vuP9UqvPHKKSVrKFXGa1v"`
 	ClientSecret string `json:"client_secret" required:"true" default:"jXiFMOPVPCWlO2M5CwWQzffpNPaGTRBG"`
 }
diff --git a/drivers/baidu_photo/utils.go b/drivers/baidu_photo/utils.go
index a50022b4663..daaf0a0e5b9 100644
--- a/drivers/baidu_photo/utils.go
+++ b/drivers/baidu_photo/utils.go
@@ -232,7 +232,7 @@ func (d *BaiduPhoto) DeleteAlbum(ctx context.Context, album *Album) error {
 		r.SetFormData(map[string]string{
 			"album_id":            album.AlbumID,
 			"tid":                 fmt.Sprint(album.Tid),
-			"delete_origin_image": "0", // 是否删除原图 0 不删除 1 删除
+			"delete_origin_image": BoolToIntStr(d.DeleteOrigin), // 是否删除原图 0 不删除 1 删除
 		})
 	}, nil)
 	return err
@@ -246,7 +246,7 @@ func (d *BaiduPhoto) DeleteAlbumFile(ctx context.Context, file *AlbumFile) error
 			"album_id":   fmt.Sprint(file.AlbumID),
 			"tid":        fmt.Sprint(file.Tid),
 			"list":       fmt.Sprintf(`[{"fsid":%d,"uk":%d}]`, file.Fsid, file.Uk),
-			"del_origin": "0", // 是否删除原图 0 不删除 1 删除
+			"del_origin": BoolToIntStr(d.DeleteOrigin), // 是否删除原图 0 不删除 1 删除
 		})
 	}, nil)
 	return err


Test patch: