jerrymakesjelly / autoremove-torrents

Automatically remove torrents according to your strategies.
https://pypi.org/project/autoremove-torrents/
MIT License
737 stars 120 forks source link

I can't use trackers and categories filter togheter #38

Closed Jorman closed 5 years ago

Jorman commented 5 years ago

Hi, I just found this and I think is very good, I made a little configuration to start but I can't find a way to configure categories and trackers to work together, this's my configuration:

my_task:
  client: qbittorrent
  host: http://127.0.0.1:8081
  strategies:
    Torrenting:
      categories:
        - FreeLeech
      trackers:
        - shareisland.org
      ratio: 1
      seeding_time: 432000 # 5 days
      # remove: seeding_time > 432000 or ratio > 1
  delete_data: true

I've all freeleech torrent in one category and I want to filter only some tracker so I added this tracker but don't seem to work. Here the full tracker url, directly from qbittorrent http://shareisland.org:2710/MYAPIKEY/announce

What I do wrong?

J

Jorman commented 5 years ago

If I remove the trackers filter, I got this:

$ autoremove-torrents --view --conf=/root/.config/autoremove-torrents/config.yml
Thu, 29 Aug 2019 22:58:47 autoremovetorrents.main INFO: Auto Remove Torrents 1.4.5
Thu, 29 Aug 2019 22:58:47 autoremovetorrents.main INFO: Loading configurations...
Thu, 29 Aug 2019 22:58:47 autoremovetorrents.main INFO: Found 1 task(s) in the file.
Thu, 29 Aug 2019 22:58:47 autoremovetorrents.task INFO: Running task 'my_task'...
Thu, 29 Aug 2019 22:58:47 autoremovetorrents.task INFO: Logging in...
Thu, 29 Aug 2019 22:58:47 autoremovetorrents.task INFO: Login successfully. The client is qBittorrent v4.1.5.
Thu, 29 Aug 2019 22:58:47 autoremovetorrents.task INFO: Getting all the torrents...
Thu, 29 Aug 2019 22:58:48 autoremovetorrents.task INFO: Please wait...We have found 7 torrent(s).
Thu, 29 Aug 2019 22:58:49 autoremovetorrents.task INFO: Please wait...We have found 46 torrent(s).
Thu, 29 Aug 2019 22:58:50 autoremovetorrents.task INFO: Please wait...We have found 83 torrent(s).
Thu, 29 Aug 2019 22:58:51 autoremovetorrents.task INFO: Please wait...We have found 109 torrent(s).
Thu, 29 Aug 2019 22:58:52 autoremovetorrents.task INFO: Please wait...We have found 145 torrent(s).
Thu, 29 Aug 2019 22:58:53 autoremovetorrents.task INFO: Please wait...We have found 183 torrent(s).
Thu, 29 Aug 2019 22:58:54 autoremovetorrents.task INFO: Please wait...We have found 224 torrent(s).
Thu, 29 Aug 2019 22:58:55 autoremovetorrents.task INFO: Found 251 torrent(s) in the client.
Thu, 29 Aug 2019 22:58:55 autoremovetorrents.strategy INFO: Running strategy Torrenting...
Thu, 29 Aug 2019 22:58:55 autoremovetorrents.strategy INFO: Total: 152 torrent(s). 143 torrent(s) can be removed.
Thu, 29 Aug 2019 22:58:55 autoremovetorrents.strategy INFO: To be deleted:

If I leave the trackers filter in place, like 1st post I got this

$ autoremove-torrents --view --conf=/root/.config/autoremove-torrents/config.yml
Thu, 29 Aug 2019 23:02:45 autoremovetorrents.main INFO: Auto Remove Torrents 1.4.5
Thu, 29 Aug 2019 23:02:45 autoremovetorrents.main INFO: Loading configurations...
Thu, 29 Aug 2019 23:02:45 autoremovetorrents.main INFO: Found 1 task(s) in the file.
Thu, 29 Aug 2019 23:02:45 autoremovetorrents.task INFO: Running task 'my_task'...
Thu, 29 Aug 2019 23:02:45 autoremovetorrents.task INFO: Logging in...
Thu, 29 Aug 2019 23:02:45 autoremovetorrents.task INFO: Login successfully. The client is qBittorrent v4.1.5.
Thu, 29 Aug 2019 23:02:45 autoremovetorrents.task INFO: Getting all the torrents...
Thu, 29 Aug 2019 23:02:46 autoremovetorrents.task INFO: Please wait...We have found 15 torrent(s).
Thu, 29 Aug 2019 23:02:48 autoremovetorrents.task INFO: Please wait...We have found 33 torrent(s).
Thu, 29 Aug 2019 23:02:49 autoremovetorrents.task INFO: Please wait...We have found 61 torrent(s).
Thu, 29 Aug 2019 23:02:50 autoremovetorrents.task INFO: Please wait...We have found 89 torrent(s).
Thu, 29 Aug 2019 23:02:51 autoremovetorrents.task INFO: Please wait...We have found 115 torrent(s).
Thu, 29 Aug 2019 23:02:52 autoremovetorrents.task INFO: Please wait...We have found 142 torrent(s).
Thu, 29 Aug 2019 23:02:53 autoremovetorrents.task INFO: Please wait...We have found 163 torrent(s).
Thu, 29 Aug 2019 23:02:54 autoremovetorrents.task INFO: Please wait...We have found 188 torrent(s).
Thu, 29 Aug 2019 23:02:55 autoremovetorrents.task INFO: Please wait...We have found 208 torrent(s).
Thu, 29 Aug 2019 23:02:56 autoremovetorrents.task INFO: Please wait...We have found 226 torrent(s).
Thu, 29 Aug 2019 23:02:57 autoremovetorrents.task INFO: Please wait...We have found 245 torrent(s).
Thu, 29 Aug 2019 23:02:58 autoremovetorrents.task INFO: Please wait...We have found 251 torrent(s).
Thu, 29 Aug 2019 23:02:58 autoremovetorrents.task INFO: Found 251 torrent(s) in the client.
Thu, 29 Aug 2019 23:02:58 autoremovetorrents.strategy INFO: Running strategy Torrenting...
Thu, 29 Aug 2019 23:02:58 autoremovetorrents.strategy INFO: Total: 0 torrent(s). 0 torrent(s) can be removed.

Seem that the strategy was not loaded at all.

Anyone have some idea?

Jorman commented 5 years ago

I removed the category and to me, seems that the problem can be on trackers parser, some trackers works, some not, and after some test I found the problem.

My alpharatio tracker is: http://tracker.alpharatio.cc:2710/MYAPIKEY/announce so if I put this on trackers: tracker.alpharatio.cc script don't find any, but if I put this tracker.alpharatio.cc:2710 script works, so I've to specify also the :2710

Do you think is better to change the patter to recognize the tracker in order to simply have the host without any extra port? Maybe one day the port will change....

What do you think?

J

jerrymakesjelly commented 5 years ago

Sorry for inconvenience, I didn't notice this. I will fix this problem.

Thank you for your feedback.

Jorman commented 5 years ago

Thank you too for the script :D

jerrymakesjelly commented 5 years ago

Fixed in version 1.4.6.