Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove from history w/files #2754

Open
thezoggy opened this issue Dec 20, 2023 · 8 comments
Open

Remove from history w/files #2754

thezoggy opened this issue Dec 20, 2023 · 8 comments

Comments

@thezoggy
Copy link
Contributor

Description

right now when removing an entry from history it just removes it from the history and does not remove the files.
this while safe, does mean users have to either know to remove via api instead or just go manually cleanup. this results in some users having clutter and not realizing it.

thoughts on making the remove icon have menu to allow users to select both options?
or add another icon to remove w/files - colorized to red or something - could only show if "destructive mode" enabled in config.

@sanderjo
Copy link
Contributor

This has been discussed before, with conclusion "No", but as a user I still would like to have this. So that you can use SAB to remove a Linux iso image you don't want any longer.

I believe reasons for No were:

  • bad person accessing your SAB webinterface
  • what if it's not there anymore because *arr has moved it?
  • access to local disk
  • ...

@Safihre
Copy link
Member

Safihre commented Dec 20, 2023

I guess we can add it the same way Sonarr does with a checkbox in the delete confirmation to also delete files.

@thezoggy
Copy link
Contributor Author

went to add this, first went to add to purge history overly.. discovered that we have guards to not remove files for 'completed' jobs when trying to do it for value=all or completed. which i guess makes sense to prevent abuse/accidents.. as we only allow it if you pass a specific nzo value. however, it doesnt look like we've ever documented this behavior...

additionally on our wiki I see we wrongly note that we wont remove files for failed jobs by default, but that does not look correct from what I see.

https://sabnzbd.org/wiki/configuration/4.2/api#history_main

NOTE By default files of failed jobs are not removed, add del_files=1 to also have them removed.

so my tentative plan is to not remove the guards and keep the guard to prevent wiping all completed/all items w/files. and just add a checkbox to the prompt if people want to remove files they can check that off before submitting. that way we dont have to add another icon or anything.

then need to see if the purge history overly > purge page - looks like it actually tries to delete the files and passes the id one at a time.. so need to update it to denote its doing the files.. but might add an additional entry to actually do one or the other there..

@thezoggy
Copy link
Contributor Author

to follow up, yeah we do not remove files for completed downloads no matter how its sent..

which changed in 4.2.0a1
cb15c79

  1. could leave things as is, just need to update documents to reflect change
  2. add function to get completed paths like the get_incomplete_path, and then actually allow deleting just single completed

@Safihre
Copy link
Member

Safihre commented Jan 12, 2024

@thezoggy That code was not used to remove the files in the Complete Folder. It always only worked on the Incomplete paths. We never had functionality to remove from Complete Folder.

@thezoggy
Copy link
Contributor Author

thezoggy commented Jan 12, 2024

looking again, you are correct. i could have sworn we used to allow removing completed at some point but doesnt look like it.
wonder why we just never documented this behavior in our api docs since it looks like its always been this way.

@thezoggy
Copy link
Contributor Author

keep running into issues where what should be a simple 5min thing turns into more and more.
'storage' stored in the db half the time is the folder path but half the time is a path to a file... so makes it a bit of a pain to use remove_all to just handle both. but in the end i gave up as i'm wasting way to much time to overcome wanting to even make this work now.

@Safihre
Copy link
Member

Safihre commented Jan 14, 2024

I'll keep it open as it's a valid feature request :)

@Safihre Safihre reopened this Jan 14, 2024
@Safihre Safihre changed the title remove from history w/files Remove from history w/files Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants