xLightsSequencer / xLights

xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers.
GNU General Public License v3.0
529 stars 196 forks source link

Purge Backups If Above x Folder Size #4550

Closed corfoto4 closed 2 months ago

corfoto4 commented 2 months ago

Describe the solution you'd like I would like the option to purge xLights backups if the backup folder exceeds a set size limit. For example, xLights will purge backups if the backup folder is over 5GB. So, it will purge the backups until the folder size is less than 5GB. The 5GB limit should be able to be changed as needed so users can choose their max folder size allowed (e.g. 2GB, 5GB, 10GB)

Describe alternatives you've considered There is the option to purge after x amount of time, but I fear that setting this will mean that all my backups will disappear if I do not open xLights for a long period of time (e.g. one day, I will open xLights and the majority of backups will be deleted).

Additional context Example implementation: Modify the "Purge Backups" setting to include an option "if folder size is greater than". If this option is selected, the user can then input a value in a text box that appears of their max desired size (in MB for integer value, or GB for float value).

derwin12 commented 2 months ago

"There is the option to purge after x amount of time, but I fear that setting this will mean that all my backups will disappear if I do not open xLights for a long period of time (e.g. one day, I will open xLights and the majority of backups will be deleted)."

It is coded to keep the newest backup - so you dont lose them all.

corfoto4 commented 2 months ago

Oh cheers. Thanks for letting me know!