Feramance / qBitrr

A simple Python script to talk to qBittorrent and Arr's
MIT License
82 stars 2 forks source link

Desired amount of free space in the downloads directory #69

Closed Retr0astic closed 4 months ago

Retr0astic commented 6 months ago

Hi, I recently came across your project which met my needs for managing qbit downloads and automatically search for new torrents if existing is stalled, i also liked the fact that you can set the desired amount of free space so that hardlinks always worked and subtitles can be downloaded, but when I set it up, i had 2GB of free space set as the desired amount, even after this, the drive is always filled up until 0b of free space is available, what is the reason for this?

Feramance commented 5 months ago

Could you kindly attach trace logs and your config for further investigation? Also, make sure you have "pre allocate disk space" disabled in qbittorrent

Retr0astic commented 5 months ago

Yes, pre-allocated is disabled, sorry for the delayed response, I'm on a vacation, I have turned on trace logs, I'll upload it after it logs for a few hours.

Retr0astic commented 5 months ago

I've got one more issue, qbitrr deletes torrents that are errored due to not having free space.

config.txt Sonarr-TV.log Radarr-4K.log

Feramance commented 5 months ago

Sorry for the delay, hoping to have this solved by end of week

Feramance commented 5 months ago

The change is larger than anticipated, as I needed to overhaul the whole functionality of it, will release soon

Retr0astic commented 5 months ago

Thanks a lot for taking your time to fix this issue.

Feramance commented 5 months ago

The current nightly branch is running the beta for this overhaul

Feramance commented 5 months ago

Seems to be working as intended, I have push the update, let me know if you experience further issues

Feramance commented 5 months ago

Just found a few more issues I need to tackle

Retr0astic commented 5 months ago

Just found a few more issues I need to tackle

I just update my image to nightly as well, I'll update you if I find any issues on my side as well.

Retr0astic commented 5 months ago

Just a small update on my experience on the latest build.

Feramance commented 5 months ago

Noted, I think I know what's needed to fix this

Feramance commented 5 months ago

And it should only pause torrents based on priority. Meaning that if the top priority torrent once downloaded would not exceed the minimum free space, then it won't be paused. It does this check on all torrents that are in a download state only (downloading/paused). It will then only start pausing on e the minimum would be exceeded. Metadata torrents are ignored to test for staleness first

Feramance commented 5 months ago

Released another update, let me know how it goes

Feramance commented 4 months ago

I've made an additional change, switch back to the latest tag, if you notice any issues let me know, in the meantime I think I can safely consider the issue resolved, just reopen the ticket if you notice any further issues. Thank you

Retr0astic commented 4 months ago

The issue still persists, apart from the README, can you advice how your qBittorrent instance is setup? So I can replicate it on mine?

Feramance commented 4 months ago

Here are my qbittorrent configs: image Screenshot 2024-05-17 100223

Retr0astic commented 4 months ago

Okay, my config are pretty similar,, but it never pauses them even if there's 0B of storage. The logs show no sign of doing anything apart from showing the container is starting and checking qbitorrent version.

sonarr.log

qbitrr.log

qbitrr config

Feramance commented 4 months ago

If you're on the latest version , you should have a FreeSpace.log in your logs folder, please make sure logs are set to trace and send it over

Retr0astic commented 4 months ago

Okay, here's the freespace log

Feramance commented 4 months ago

How long was this log run for please? As it's as though the process hasn't run at all yet

Retr0astic commented 4 months ago

The previous logs where an hour after startup.

This is log is almost 24 hours later.

It seems to be working well now, looks like only the startup is slow.

Retr0astic commented 4 months ago

After further testing, this issue seems fixed, and the feature is working fine for me.

I have an enhancement suggestion to this feature:

Let the script loop through all active downloads and if no downloads can satisfy the free space limit, let the highest priority download until it hits that free space limit.

Feramance commented 4 months ago

After further testing, this issue seems fixed, and the feature is working fine for me.

Glad to hear, might I ask what solved the problem please?

I have an enhancement suggestion to this feature:

Let the script loop through all active downloads and if no downloads can satisfy the free space limit, let the highest priority download until it hits that free space limit.

It's a good idea though as this project has a replacement in development and this would be a minor change with a lot of code refactoring, I don't see it worth it sorry.

Retr0astic commented 4 months ago

After further testing, this issue seems fixed, and the feature is working fine for me.

Glad to hear, might I ask what solved the problem please?

I can't say for sure, the script didn't do anything for an hour, then started working properly, it seems to be an issue on my end.

I have an enhancement suggestion to this feature: Let the script loop through all active downloads and if no downloads can satisfy the free space limit, let the highest priority download until it hits that free space limit.

It's a good idea though as this project has a replacement in development and this would be a minor change with a lot of code refactoring, I don't see it worth it sorry.

No need to apologize. I'm just throwing around ideas.