ThijmenGThN / swaparr

✦ A robust solution addressing stalled downloads in Starr apps.
MIT License
46 stars 0 forks source link

Sonarr: The API has responded with an invalid response #11

Closed xflamed closed 6 months ago

xflamed commented 6 months ago

I have the following docker compose:

services:

  radarr:
    image: ghcr.io/thijmengthn/swaparr:latest
    container_name: swaparr-radarr
    restart: unless-stopped
    environment:
      - BASEURL=http://192.168.2.2:9002 # IP or FQDN           (Required)
      - APIKEY=          # Radarr API Key       (Required)                
      - PLATFORM=radarr               # "radarr" or "sonarr" (Optional) default: radarr
      - TIME_THRESHOLD=2h             # 1d, 6h, 30m, etc..   (Optional) default: 2h    
      - SIZE_THRESHOLD=25GB           # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB  
      - CHECK_INTERVAL=10m            # 1d, 6h, 30m, etc..   (Optional) default: 10m   
      - STRIKE_THRESHOLD=3            # Positive number      (Optional) default: 3     
      - AGGRESSIVE_STRIKES=false      # Boolean              (Optional) default: false 

  # -- (Optional)
  sonarr:
    image: ghcr.io/thijmengthn/swaparr:latest
    container_name: swaparr-sonarr
    restart: unless-stopped
    environment:
      - BASEURL=http://192.168.2.2:9003 # IP or FQDN           (Required)
      - APIKEY=          # Sonarr API Key       (Required)                
      - PLATFORM=sonarr               # "radarr" or "sonarr" (Optional) default: radarr
      - TIME_THRESHOLD=2h             # 1d, 6h, 30m, etc..   (Optional) default: 2h    
      - SIZE_THRESHOLD=25GB           # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB  
      - CHECK_INTERVAL=10m            # 1d, 6h, 30m, etc..   (Optional) default: 10m   
      - STRIKE_THRESHOLD=3            # Positive number      (Optional) default: 3     
      - AGGRESSIVE_STRIKES=false      # Boolean              (Optional) default: false

Radarr works fine but with Sonarr i get the following error:

╭─╮ Unable to process queue, will attempt again next run.
╰─╯ The API has responded with an invalid response.
error decoding response body: missing field `movie` at line 168 column 5
╭───────────────────────────────────────────────────────────────────────────╮
│                            No torrents found                              │
╰───────────────────────────────────────────────────────────────────────────╯
 ─ Checking again in 10m..

Can you help me with this?

ThijmenGThN commented 6 months ago

Hi @xflamed

Would it be possible for you to format your compose file properly in this issue, it's a bit hard for me to read.

You can do so by using 3 ` backticks around the code, for more info: search "codeblocks in readme".

What is exactly the issue you're facing?

Edit: Not quite sure if this is the issue but it looks like the environment variable PLATFORM is not being read properly because Swaparr is expecting the attribute "movie" from the API.

^ Thijmen

xflamed commented 6 months ago

Thank you for your reply , i updated my starting post. Is this better readable?

ThijmenGThN commented 6 months ago

Thank you for your reply , i updated my starting post. Is this better readable?

Yes, thank you!

Could you maybe post the full logs of your Sonarr instance of Swaparr?

Thanks

^ Thijmen

xflamed commented 6 months ago

This is the full log:


 ─ Swaparr
╭─╮ Platform: sonarr
│ │ Time threshold: 2h
│ │ Size threshold: 25GB
│ │ Strike threshold: 3
╰─╯ Aggresive strikes: false
 ─ Checking every: 10m

 ─ WARN
╭─╮ Unable to process queue, will attempt again next run.
╰─╯ The API has responded with an invalid response.
error decoding response body: missing field `movie` at line 168 column 5
╭───────────────────────────────────────────────────────────────────────────╮
│                            No torrents found                              │
╰───────────────────────────────────────────────────────────────────────────╯
 ─ Checking again in 10m..

I do have current downloads running so it should show something

ThijmenGThN commented 6 months ago

Hi @xflamed

Thank you for opening this issue, the problem has been identified and I'm currently working on a solution. You may expect a new release addressing this in a couple minutes.

Thanks again!

^ Thijmen

ThijmenGThN commented 6 months ago

The reported issue should now be resolved. Please confirm whether you're experiencing the same problem on your end. Additionally, remember to update Swaparr on your host before conducting any further tests.

^ Thijmen

xflamed commented 6 months ago

Thank you for the quick solution, it works now