"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
gphotos: implment --gphotos-proxy to allow download of full resolution media
Nick Craig-Wood22e13eea471b
diff --git a/backend/googlephotos/googlephotos.go b/backend/googlephotos/googlephotos.goindex b94fbac17..263a5610b 100644--- a/backend/googlephotos/googlephotos.go+++ b/backend/googlephotos/googlephotos.go@@ -159,6 +159,34 @@ listings and transferred.Without this flag, archived media will not be visible in directorylistings and won't be transferred.`,Advanced: true,+ }, {+ Name: "proxy",+ Default: "",+ Help: strings.ReplaceAll(`Use the gphotosdl proxy for downloading the full resolution images++The Google API will deliver images and video which aren't full+resolution, and/or have EXIF data missing.++However if you ue the gphotosdl proxy tnen you can download original,+unchanged images.++This runs a headless browser in the background.++Download the software from [gphotosdl](https://github.com/rclone/gphotosdl)++First run with++ gphotosdl -login++Then once you have logged into google photos close the browser window+and run++ gphotosdl++Then supply the parameter |--gphotos-proxy "http://localhost:8282"| to make+rclone use the proxy.+`, "|", "`"),+ Advanced: true,}, {Name: config.ConfigEncoding,Help: config.ConfigEncodingHelp,@@ -180,6 +208,7 @@ type Options struct {BatchMode string `config:"batch_mode"`BatchSize int `config:"batch_size"`BatchTimeout fs.Duration `config:"batch_timeout"`+ Proxy string `config:"proxy"`}// Fs represents a remote storage server@@ -970,10 +999,14 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Readfs.Debugf(o, "Open: Failed to read metadata: %v", err)return nil, err}+ url := o.downloadURL()+ if o.fs.opt.Proxy != "" {+ url = strings.TrimRight(o.fs.opt.Proxy, "/") + "/id/" + o.id+ }var resp *http.Responseopts := rest.Opts{Method: "GET",- RootURL: o.downloadURL(),+ RootURL: url,Options: options,}err = o.fs.pacer.Call(func() (bool, error) {diff --git a/docs/content/googlephotos.md b/docs/content/googlephotos.mdindex 410a2787b..31154a92b 100644--- a/docs/content/googlephotos.md+++ b/docs/content/googlephotos.md@@ -502,12 +502,18 @@ is covered by [bug #112096115](https://issuetracker.google.com/issues/112096115)**The current google API does not allow photos to be downloaded at original resolution. This is very important if you are, for example, relying on "Google Photos" as a backup of your photos. You will not be able to use rclone to redownload original images. You could use 'google takeout' to recover the original photos as a last resort**+**NB** you **can** use the [--gphotos-proxy](#gphotos-proxy) flag to use a+headless browser to download images in full resolution.+### Downloading VideosWhen videos are downloaded they are downloaded in a really compressedversion of the video compared to downloading it via the Google Photosweb interface. This is covered by [bug #113672044](https://issuetracker.google.com/issues/113672044).+**NB** you **can** use the [--gphotos-proxy](#gphotos-proxy) flag to use a+headless browser to download images in full resolution.+### DuplicatesIf a file name is duplicated in a directory then rclone will add the