Feramance / qBitrr

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

Bad Paths Issue. #52

Closed Healzangels closed 8 months ago

Healzangels commented 8 months ago

Thanks again for the help on the Traceback issue!

I believe I got a little further in troubleshooting my bad paths/config for the pausing of torrents I'm seeing however having difficulty pinpointing/resolving.

I went ahead and created a new config/docker container, this time I left the default mapping of /completed_downloads for the container. My Unraid Docker template config looks like the following:

DockerConfig

I than within the config.toml have set the following:

CompletedDownloadFolder = "/completed_downloads"

Checking on my QBittorrent side I have the following configured for my Default Save Path Default

My Qbittorent Docker is mapped Container: /data/torrents Host: /mnt/user/data/torrents/ TorrentData

With the settings setup as the above what I am now seeing with my log is again the Pausing of Complete torrent but also

Missing Torrent: [TorrentState.STALLED_UPLOAD] [LostYears] Spy x Family - S02E11 (WEB 1080p x265 10-bit AAC EAC3) [Dual-Audio] | Season 2 | S2 (dd24a3cc744058d6c6cf990090b7b15886078332) - File does not seem to exist: /data/torrents/tv/[LostYears] Spy x Family - S02E11 (WEB 1080p x265 10-bit AAC EAC3) [ACD4741A]/[LostYears] Spy x Family - S02E11 (WEB 1080p x265 10-bit AAC EAC3) [ACD4741A].mkv 

So something isn't mapping quiet right here. I would expect the container to see this path as /completed_downloads/tv/[LostYears] Spy x Family - S02E11 (WEB 1080p x265 10-bit AAC EAC3) [ACD4741A] as /data/torrents/tv/[LostYears] Spy x Family - S02E11 (WEB 1080p x265 10-bit AAC EAC3) [ACD4741A] is what the QBittorrent instance would see the file as? Assume that's part of my problem.

I also tried changing the path mapping on my QBitrr Docker Template to be Container: /data/torrents Host: /mnt/user/data/torrents/ datatorrent

And updating config.toml to be CompletedDownloadFolder = "/data/torrents"

With the settings setup as above I see the pause of downloads but this time

Downloaded scan error: [/data/torrents/tv/[LostYears] Spy x Family - S02E11 (WEB 1080p x265 10-bit AAC EAC3) [ACD4741A]][DD24A3CC744058D6C6CF990090B7B15886078332][Hardlink][Internal Server Error: The JSON value could not be converted to NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode. Path: $.importMode | LineNumber: 0 | BytePositionInLine: 227.]

So either I might be misunderstanding what the CompletedDownloadFolder should be set to or maybe I'm running into a conflict some where else.

Typically pretty good with mapping docker/host paths so a bit stumped on where the issue is coming into play. Thanks again for all your assistance!

Healzangels commented 8 months ago

Hopefully that all made sense/provided OK examples of what I'm seeing. Happy to test any other combination of paths/mappings and provide screenshots and logs.

Feramance commented 8 months ago

I'd like you to try two things, first off try running in privileged mode and see if that changes anything, secondly set logs to trace and attach the logs after you see the error pop up at least once

Healzangels commented 8 months ago

Certainly! Which path would you like me to test with this the/completed_downloads which lead to the Missing Torrent: or /data/torrents which leads to Downloaded scan error:

Thanks

Feramance commented 8 months ago

With /data/torrents though please also set the path for the categories in qittorrent used by your Radarr/Sonarr instances to /data/torrents too as that could cause some issues too

Healzangels commented 8 months ago

No change on either /completed_downloads or /data/torrents with container set to privileged mode.

Sonarr-TV-data_torrents.log

Attached are the TRACE version of log files while the paths are set to /data/torrents and still set to run as privileged

With /data/torrents though please also set the path for the categories in qittorrent used by your Radarr/Sonarr instances to /data/torrents too as that could cause some issues too

Not exactly sure what is meant by "set the path for the categories in qittorrent used by your Radarr/Sonarr instances" Sorry! As far as how I set those Categories up in the past I followed https://trash-guides.info/Downloaders/qBittorrent/How-to-add-categories/ I use the same paths described in the Trash-Guides Basic-Setup as well.

I believe that should have the proper /data/torrent for those categories since it would be the default save path/data/torrents/ + the category applied by Radarr/Sonarr.

Following the guides "You don't need to add the full path under Save Path, it will use the root download path that you setup in Options => Saving Management => Default Save Path:."

Feramance commented 8 months ago

Set the category paths to /data/torrents instead of tv or movies etc. meanwhile I'll take a look at the logs

Feramance commented 8 months ago

Potential fix alert, please set ImportMode = "Auto" in the config and test again after updating to the latest nightly build

Feramance commented 8 months ago

Set the category paths to /data/torrents instead of tv or movies etc. meanwhile I'll take a look at the logs

This should not be necessary, but for testing sake

Healzangels commented 8 months ago

Awesome going to test now and will report back shortly! I'll start with just changing ImportMode and implement from there.

Healzangels commented 8 months ago

Looking promising! Updated to nightly and just changed the ImportMode = "Auto" (left path in qbittorent tv) I am now seeing the following log output (I changed ConsoleLevel back to Debug) which seems positive? The torrents are still pausing however.

Scan

Sonarr-TV.log

TRACE level as well. Sonarr-TV Trace.log

Including the new Config file I've been using as well in case something there is what is causing them to pause. I've only completed the top Sonarr-TV section during the testing. config new.txt

Thanks once again for all your updates/changes to get this far!

Feramance commented 8 months ago

Please keep me informed on progress so that I may push the patch if working

Feramance commented 8 months ago

Also, please update to the latest nightly build and let me know what torrent behaviour is like, made some changes to stop the pausing

Healzangels commented 8 months ago

Awesome, I've updated nightly build. Testing now and seeding is being paused. Attached is a new Trace level log Sonarr-TV_nightly.log

-Cheers!

Feramance commented 8 months ago

Please update to the latest nightly and test again. I have made changes to the way the pausing functionality works throughout qBitrr

Healzangels commented 8 months ago

Updated but unfortunately still pausing Trace log from latest run. Sonarr-TV_night_updated.log

Feramance commented 8 months ago

Do the paused torrents still have the tag qbitrr-allowed_Seeding in qbittorrent?

Healzangels commented 8 months ago

Paused torrents not seeing the qbitrr-allowed_Seeding tag however have a few movies seeding as well (radarr not configured at this time) and those I am seeing the qbitrr-allowed_Seeding tag on.

I can try removing a torrent and re-adding and see if the new addition gets the tag.

Healzangels commented 8 months ago

Removed and resent torrent down from Sonarr to Qbittorrent, downloaded fine but does pause once completed. Not being tagged with qbitrr-allowed_Seeding

Feramance commented 8 months ago

I'll replicate the issue as I know why I'm not experiencing it. In the mean time if you're ok with it for a day or two, set up qBitrr to work with everything as you expect it to, I will inform you once I have a solution and I also suggest downgrading the latest tag rather than the nightly tag and recreating the docker container

Healzangels commented 8 months ago

Super and will do, I'll have my config completely filled/ready to go for future tests.

Thanks again for all your time/assistance! I think I owe you a coffee, if you've got a link love to support all the hard work. -Cheers!

Feramance commented 8 months ago

By any chance, do you have any seed limits set in qbittorrent?

Feramance commented 8 months ago

Please test the latest nightly build, if all goes well I'll push the release

Feramance commented 8 months ago

The latest release also has the pausing fix, together with some new features. Let me know how it goes and whether there's more tweaking to do

Healzangels commented 8 months ago

Super, updating nightly branch now and will follow up shortly!

Healzangels commented 8 months ago

Wahoo! Seeding is continuing and I'm seeing the qbitrr-allowed_Seeding applied to things in the tv category!

I've attached another TRACE level log as everything looks good but maybe you'll see something I've missed. Sonarr-TV_1_11.log

Going to do a few other quick tests but looking good! I hadn't completed the config like I mentioned yesterday (woops sorry!) but will also get that completed/tested/

Thank you very much!

Healzangels commented 8 months ago

Also not sure it matters anymore but just for information sake I also don't/didn't have any seeding limit set on the Qbittorrent side.

Feramance commented 8 months ago

Perfect, seems to be going well. Just a couple of notes, I had mentioned to change the path for the qittorrent categories but you should leave them as they are recommended by trash-guides.

In addition, there's also a new feature available which will require you to generate a new config through qBitrr or grab the sample and copy your settings over where you'll also find a new config.

If any more issues crop up, do not hesitate to contact me again and should you have any feature requests, I'd be happy to hear

Healzangels commented 8 months ago

Fantastic, update config file with latest template and filled out/everything working out great!

I had one unrelated to the issue question, but more on how to configure trackers.

Under the Sonarr-TV section is the line Trackers = [] which I assume is where you would specify Tracker specific setting for the tracker. Not exactly sure what the format would look like however here.

For example I don't have a separate instance of Sonarr for anime, I would like to include the Nyaa tracker in my Sonarr-TV section. Saw for Sonarr-Anime the format appears as such but without the Trackers = [] line.

[[Sonarr-Anime.Torrent.Trackers]]
Name = "Nyaa"
Priority = 10
URI = "http://nyaa.tracker.wf:7777/announce"
MaximumETA = 18000
DownloadRateLimit = -1
UploadRateLimit = -1
MaxUploadRatio = -1
MaxSeedingTime = -1
AddTrackerIfMissing = false
RemoveIfExists = false
SuperSeedMode = false
AddTags = ["qBitrr-anime"]

For Sonarr-TV and the Trackers = [] would that go within the []? Apologies for misunderstanding what the configuration should look like here.

My other thought was something like

Trackers = []

[[Sonarr-TV.Torrent.Trackers]]
Name = "Nyaa"
Priority = 10
URI = "http://nyaa.tracker.wf:7777/announce"
MaximumETA = 18000
DownloadRateLimit = -1
UploadRateLimit = -1
MaxUploadRatio = -1
MaxSeedingTime = -1
AddTrackerIfMissing = false
RemoveIfExists = false
SuperSeedMode = false
AddTags = ["qBitrr-tv"]

But again wasn't sure how the Trackers = [] comes into play here or how the proper format would look.

Thanks once again for all your time and assistance in getting this running on my system very excited to use!

Feramance commented 8 months ago

I have updated the config example, I'll get around to the config generator later. The default config has 4 instances total, 2 for sonarr and 2 for radarr. However, qBitrr can handle a theoretical unlimited number of instances, just make sure you have all the config in place for the specific instance (i.e. Sonarr-TV, Sonarr-Anime, Radarr-1080, Radarr-4K, etc)

Healzangels commented 8 months ago

Awesome, thanks for the info/heads up on the template.

D'oh might also have one remaining small hic-up. Might also be on my end/configuration if t he template just updated. Possible Bug.log Saw the following within Sonarr log, new config is back to INFO level so not sure it will have all the relevant information. -Cheers!

Feramance commented 8 months ago

That's a new issue related to a functionality upgrade to have things better in line, I'll tackle it tomorrow. Thanks for the heads up

Feramance commented 8 months ago

To avoid that bug and have it functional for now, set series search to false in the configs for Sonarr

Healzangels commented 8 months ago

Cool, just had an opportunity to copy the new template over/filled out. Thanks for the change/clarification on the trackers. Having a better time follow along/understand the config with the current template format! I've set the seriessearch to false for the time being as well, thanks for the tip.

Healzangels commented 8 months ago

Also just for fun was playing around with a logo for my container on unraid. Made this and figured would share https://i.ibb.co/LdY6p6y/QBitrr-Logo.png -Cheers!

Feramance commented 8 months ago

Also just for fun was playing around with a logo for my container on unraid. Made this and figured would share https://i.ibb.co/LdY6p6y/QBitrr-Logo.png -Cheers!

That's actually really cool, I think I'll use it as inspiration but I'll definitely make some small changes. I'll let you know when I get to it, or you'll see it on GitHub

Feramance commented 8 months ago

Awesome, thanks for the info/heads up on the template.

D'oh might also have one remaining small hic-up. Might also be on my end/configuration if t he template just updated. Possible Bug.log Saw the following within Sonarr log, new config is back to INFO level so not sure it will have all the relevant information. -Cheers!

This issue should be sorted, if you encounter it again, please open another issue. Thanks