madslundt / cloud-media-scripts

Upload and stream media from the cloud with or without encryption. Cache all new and recently streamed media locally to access quickly and reduce API calls
MIT License
89 stars 11 forks source link

Possible Enhancement - Allow Deletion #36

Closed Dulanic closed 6 years ago

Dulanic commented 6 years ago

So I know last year plexidrive added the ability to delete files. I have edited my config etc... to remove ready only and change RO to RW. So far it's working great,

Am I correct that UFS should write to local-decrypt 1st as UFS lists the local decrypt dir as 1st level? Seems to be working so far. This would allow us to delete in plex and have it remove the files from GD.

My changes currently: Per testing it is properly loading files to decrypt when downloading.

ufs_options="-o cow,allow_other,direct_io,nonempty,auto_cache,sync_read,uid=$uid,gid=$gid"
plexdrive_options="--temp=${plexdrive_temp_dir} -o allow_other --clear-chunk-max-size=300G --clear-chunk-age=24h --chunk-size=10M"
ufs_mounts="${local_decrypt_dir}=RW:${cloud_decrypt_dir}=RW"

If you think it's a decent idea to add, I can help code it in the config/mount.remote.

madslundt commented 6 years ago

This would of course only work if the user aren't using encryption.

It's a great idea and if you have the time hit me with a PR.

Dulanic commented 6 years ago

Actually, that's not correct. It works with encryption. With encryption rclone passes the delete to plexdrive which passes it to GD.

Maybe this should just be coded this way permanently since the writes still default to the 1st path on unionfs.

image

image

madslundt commented 6 years ago

Oh yeah I see of course. My mistake

Dulanic commented 6 years ago

Found another major help of doing it this way. Sonarr/Radarr can delete old versions if it is upgrading. I noticed I had like 4 copies of movies before and this resolves that problem.

Dulanic commented 6 years ago

Closing as merged.