sirrobot01 / debrid-blackhole

A Debrid Torrent Blackhole with Proxy Support
12 stars 0 forks source link

*Arrs still pulling non-cached torrents #2

Open jamauai opened 4 days ago

jamauai commented 4 days ago

What am I doing wrong? My *Arrs are still retrieving non-cached torrents with v0.2.2. I'm using the proxy feature, not blackhole / torrent watch folders.

Screenshot 2024-09-15 at 04 54 46@2x

config.json:

{
  "debrid": {
    "name": "realdebrid",
    "host": "https://api.real-debrid.com/rest/1.0",
    "api_key": "api_key",
    "folder": "data/downloads/torrents/torrent_files/realdebrid/",
    "rate_limit": "250/minute"
  },
  "proxy": {
    "enabled": true,
    "port": "8181",
    "debug": true,
    "username": "username",
    "password": "password",
    "cached_only": true
  },
  "max_cache_size": 1000,
  "qbittorrent": {
    "port": "8282",
    "username": "admin",
    "password": "admin",
    "download_folder": "/media/symlinks/",
    "categories": ["sonarr", "radarr"],
    "refresh_interval": 5
  }
}

The logs look OK, I think?

2024/09/15 14:58:16 [103] INFO: Running 2 CONNECT handlers
2024/09/15 14:56:46 [098] INFO: Copying response to client 200 OK [200]
2024/09/15 14:58:16 [102] INFO: Accepting CONNECT to 192.168.1.3:8080
2024/09/15 14:58:16 [102] INFO: on 0th handler: &{0 <nil> 0x70e3c0} 192.168.1.3:8080
2024/09/15 14:58:16 [102] INFO: Running 2 CONNECT handlers
2024/09/15 14:58:16 [101] INFO: on 0th handler: &{1 <nil> 0x70d7c0} 192.168.1.3:8080
2024/09/15 14:58:16 [101] INFO: Running 2 CONNECT handlers
2024/09/15 14:56:52 [100] INFO: Accepting CONNECT to jackett.servername.box.ca:443
2024/09/15 14:56:52 [100] INFO: on 0th handler: &{0 <nil> 0x70e3c0} jackett.servername.box.ca:443
2024/09/15 14:56:52 [100] INFO: Running 2 CONNECT handlers
2024/09/15 14:56:52 [099] INFO: on 0th handler: &{1 <nil> 0x70d7c0} jackett.servername.box.ca:443
2024/09/15 14:56:52 [099] INFO: Running 2 CONNECT handlers
2024/09/15 14:56:46 [098] INFO: Copied 2 bytes to client error=<nil>
2024/09/15 14:56:46 [098] INFO: Received response 200 OK
2024/09/15 14:56:46 [098] INFO: Sending request GET http://192.168.1.3:6500/api/v2/torrents/info?category=movies
2024/09/15 14:56:46 [098] INFO: Got request /api/v2/torrents/info 192.168.1.3:6500 GET http://192.168.1.3:6500/api/v2/torrents/info?category=movies
2024/09/15 14:56:46 [097] INFO: Copied 33 bytes to client error=<nil>
2024/09/15 14:56:46 [097] INFO: Copying response to client  [407]
2024/09/15 14:56:46 [097] INFO: Got request /api/v2/torrents/info 192.168.1.3:6500 GET http://192.168.1.3:6500/api/v2/torrents/info?category=movies
2024/09/15 14:56:46 [096] INFO: Copied 3745 bytes to client error=<nil>
2024/09/15 14:56:46 [096] INFO: Copying response to client 200 OK [200]
2024/09/15 14:56:46 [096] INFO: Received response 200 OK
2024/09/15 14:56:46 [096] INFO: Sending request GET http://192.168.1.3:6500/api/v2/app/preferences
2024/09/15 14:58:16 [103] INFO: on 0th handler: &{1 <nil> 0x70d7c0} 192.168.1.3:8080
2024/09/15 14:58:16 [104] INFO: Running 2 CONNECT handlers
2024/09/15 14:58:16 [104] INFO: on 0th handler: &{0 <nil> 0x70e3c0} 192.168.1.3:8080
2024/09/15 14:58:16 [104] INFO: Accepting CONNECT to 192.168.1.3:8080
2024/09/15 14:58:16 [105] INFO: Got request /api/v2/app/webapiVersion 192.168.1.2:6500 GET http://192.168.1.2:6500/api/v2/app/webapiVersion
2024/09/15 14:58:16 [105] INFO: Copying response to client  [407]
2024/09/15 14:58:16 [105] INFO: Copied 33 bytes to client error=<nil>
2024/09/15 14:56:46 [096] INFO: Got request /api/v2/app/preferences 192.168.1.3:6500 GET http://192.168.1.3:6500/api/v2/app/preferences

Proxy setting:

Screenshot 2024-09-15 at 04 53 08@2x

sirrobot01 commented 4 days ago

This is an issue with RD where downloading infohashes are marked as instant availability.

Assuming someone adds an uncached torrent to RD and they stopped it or it's still downloading, RD marks that torrent as instantly available even when it's not

jamauai commented 3 days ago

I see. Is there any way around that to determine whether a torrent is truly cached? Or should I be using Alldebrid / Premiumize instead (if that's supported by debrid-blackhole) ?

sirrobot01 commented 2 days ago

There's a new version that handles uncached torrent.

If you set debrid.download_uncached to false, uncached torrents will fail, thereby triggering a redownload for another(If you set it in your *arrs).

The already submitted uncached torrent will be deleted from your RD(thereby not clogging your RD torrent list).

You'll need to update your docker image.