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

Feature request - hardlinks count or add a pre/post script option #146

Open
Jorman opened this issue Jul 20, 2022 · 3 comments
Open

Feature request - hardlinks count or add a pre/post script option #146

Jorman opened this issue Jul 20, 2022 · 3 comments
Labels

Comments

@Jorman
Copy link

Jorman commented Jul 20, 2022

Hi, I'm making a bash script to better handle my torrents, the idea is pretty simple

The idea is:
I delete only torrents (in certain categories) but only if seed time is enough and if hardlink count is more than 1.
Usually I delete torrent only after x time and/or seeding time, but just came into my mind that I make hardlinks and maybe this "copy" stay in place for months, so, because is one hardlink don't take extra space and so, why delete it? is only one torrent that can help in seed ratio, I can delete it when the hardlinks count is 1 and all remaining conditions are good. I hope I explained my idea.

So for this reason I created a bash script that do all this pre-check, (only for selected categories) and after that call the autoremove-torrents to clean all remaining categories.

Or do you think that is possible to check hardlinks count inside autoremove-torrents? Make sense for you?

J

@jerrymakesjelly
Copy link
Owner

jerrymakesjelly commented Jul 24, 2022

I think I get your point. Do you mean that you need a mechanism, which checks the hardlink count before deleting torrents, and only deletes torrent when the hardlink count of it equals to 1?

If so, I prefer to provide a mechanism to check the hardlink count in autoremove-torrents, instead of pre/post script option.

PS: I may need some time to implement it, because currently autoremove-torrents doesn't have the ability to fetch the file list.

@Jorman
Copy link
Author

Jorman commented Jul 24, 2022

Yes, you got the point, equal to 1 and with the same logic, like seed time > X or all others function, like now.
On qBittorren you already have the file, I made this for qBittorrent, but is a script! I use systemd timers so I can start it before your autoremove-torrents easily.
https://github.com/Jorman/Scripts/blob/master/qBittorrentHardlinksChecker.sh
qBittorrent save the path so I can easily check if the file have one or more hardlinks, maybe all others client have the saving path information from the API?

@GlassedSilver
Copy link

Any update on this? I find this EXTREMELY interesting, because it can help keep torrents healthy without having to manually figure out which ones are only stored anymore for seeding when you possibly already switched them out for something better for yourself, now wasting space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants