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

[Bug] Keeping when it should delete #5

Open
kanjieater opened this issue Sep 15, 2021 · 2 comments
Open

[Bug] Keeping when it should delete #5

kanjieater opened this issue Sep 15, 2021 · 2 comments

Comments

@kanjieater
Copy link

kanjieater commented Sep 15, 2021

{
  "logLocation": "./dscleanup.log",
  "deleteTasks": false,
  "deleteFiles": false,
  "qbt": {
    "username": "asdf",
    "password": "secure",
    "url": "http://192.168.x.x:1234/api/v2"
  },
  "trackers": [
    {
      "tracker":"aprivate.tracker",
      "maxDaysToKeep" : 11365,
      "up_limit" : -1,
      "deleteMessages" : [
        "unregistered torrent"
      ] 
    },   
    {
      "tracker":"*",
      "maxDaysToKeep" : 0,
      "up_limit" : 30
    }      
  ]
}

[09:50:05.021--INF] Task publicTrackerFile.rar deleted - too old
[09:50:05.022--INF] - Delete: * publicTrackerFile.rar (pausedUP, 6 days)
[09:50:05.022--INF] - Keep: * samepublicTrackerFile.rar (uploading, 34.97 seconds)
[09:50:05.036--INF] Pausing 68 tasks...

I've found this program super useful so far. For some reason, it's deciding to keep a file that finished downloading though, even though it should be covered by the "*" tracker list. It's already paused all the other torrents from that tracker(since i don't actually have deleting enabled just yet"). However, despite this most recent one looking the same to me, it won't stop it.

I run the qbtmanager.exe as an external program on torrent completion. But even when I manually run, the logs show that it's uploading and marked as a Keep. How can I get a torrent that is finished downloading to stop if it's from my tracker: "*" list?

I'm on QBT 4.2.5 by the way. What version is supported?

@kanjieater
Copy link
Author

I've noticed the opposite can occur too. Where a private tracker had a torrent that was 700 days old, but it still was deleted, even though it's under my large number of 11365.

Doing a little investigation it looks like qBT keeps trackers in the left hand TRACKERS section with names like aprivate.com, but then the tracker url that comes back from the /torrents/tracker endpoint has url: "https://tracker.aprivate.com/someHash/announce"

As well as PEX, LSD, and DHT usually saying "this torrent is private".

I'm wondering if that can get in the way? What should I be putting in the json key for "tracker": "aprivate.tracker" or "tracker": "https://tracker.aprivate.com/someHash/announce"
I thought it was the simple one, as thats what seems to be working, but now some of my torrents got deleted that I wasn't expecting to, so I am unsure.

@Nodens-
Copy link

Nodens- commented Oct 15, 2022

I took a look at the code due to other issues and I saw that it just checks if the string is contained in the trackers announcement url . so for https://tracker.aprivate.com/someHash/announce in your example aprivate would match. And so would any substring. You don't need to enter the entire url only part of it that it's unique, so usually the domain name would do.

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

No branches or pull requests

2 participants