dan-online / autopulse

💫 automated scanning tool that bridges media organizers such as Sonarr and Radarr with media servers such as Plex and Jellyfin
92 stars 1 forks source link

bug: How to set up triggers on Radarr/Sonarr #7

Open Cousclou opened 1 week ago

Cousclou commented 1 week ago

Description of the bug

With autoscan, it was enough to put 'http://localhost:3030/triggers/sonarr' from Sonarr, for example, to trigger the process. How does it work for autopulse? I get an error when I try to do the same.

Steps To Reproduce

image

Additional Information

No response

dan-online commented 1 week ago

Hey @Cousclou you just need to add it to the config, I've provided an example here and rewrite is optional

Cousclou commented 1 week ago

I did it, I added a series on sonarr and nothing was processed, nothing went up on plex.


# app:
  # hostname: 0.0.0.0
  # port: 2875
  # database_url: postgres://autopulse:autopulse@localhost:5432/autopulse

 auth:
   username: admin-autopulse
   password: xxxxxxxxxxxxxxxxxxx

 opts:
   check_path: true # Check if the path exists, assuming the path is available to the container
   max_retries: 5 # Exponential backoff when a target fails

 triggers:
   sonarr:
     type: sonarr
     rewrite:
       from: "/data/_01 SERIES"
       to: "/media/cous/DATA/_DATA/_01 SERIES"

 webhooks:
   discord:
     type: "discord"
     url: "https://discord.com/api/webhooks/12820455987049/0cgOmb2Vl2LC"

 targets:
   plex:
     type: plex
     url: http://192.168.34.1:32400
     token: xxxxxxxxxxxxxxxxxxxxxxxxx
dan-online commented 1 week ago

Hmm, that is odd, if you disable check_path does it process? If so then either it can't see the file, or this is indeed a bug

JonathanLew1s commented 1 week ago

You miss an r in the trigger URL hook. you have "sonar" when the config calls it "sonarr"

Cousclou commented 1 week ago

Yes, I had also tried with an r in addition without success.

I'm doing a test tonight and I'll tell you that again

JonathanLew1s commented 1 week ago

For me I expose over internet via traefik, downloader and media server are in different locations so using a FQDN. Maybe you could try having sonarr and autopulse in the same docker network

Cousclou commented 5 days ago

It doesn’t seem to be working well. I moved the container to the same Docker network on Sonarr, but I’m having path issues, it seems.

image

conf.yaml :


# app:
  # hostname: 0.0.0.0
  # port: 2875
  # database_url: postgres://autopulse:autopulse@localhost:5432/autopulse

 auth:
   username: admin-autopulse
   password: XXXXXXXXXXXXXXXX

 opts:
   check_path: false # Check if the path exists, assuming the path is available to the container
   max_retries: 5 # Exponential backoff when a target fails

 triggers:
   sonarr:
     type: sonarr
     rewrite:
       from: "/data/_01 SERIES" #SONARR PATH
       to: "/media/cous/DATA/_DATA/_01 SERIES" #PLEX PATH
       from: "/data/_03 ANIMES" #SONARR PATH
       to: "/media/cous/DATA/_DATA/_03 ANIMES"  #PLEX PATH
       from: "/4tousb/series" #SONARR PATH
       to: "/media/cous/DATA/_DATA/_01 SERIES"  #PLEX PATH

 webhooks:
   discord:
     type: "discord"
     url: "https://discord.com/api/webhooks/12820451010tJM8tdkLmSg9fZU2yR232j8vIAG4TcstfK7dCKsx"

 targets:
   plex:
     type: plex
     url: http://192.168.34.1:32400
     token: XXXXXXXXXXXXXXXXXX
dan-online commented 5 days ago

Probably because I don't have support for multiple from/to rewrites. I added regex support at some point so maybe that would be better, I can check tomorrow what an example rewrite would be for your case

JonathanLew1s commented 5 days ago

Or have two sonarr entities in autopulse and two webhooks in sonarr, to cover the rep library paths. Could use sonarr library tags to trigger the relevant webhook.

Cousclou commented 4 days ago

Or have two sonarr entities in autopulse and two webhooks in sonarr, to cover the rep library paths. Could use sonarr library tags to trigger the relevant webhook.

I will try that tonight

Cousclou commented 17 hours ago

it never switches to processed

image

JonathanLew1s commented 16 hours ago

Sonar or sonarr, what is in your config file?

Cousclou commented 14 hours ago
 auth:
   username: admin-autopulse
   password: XXXXXXXXXXXXXXXXX

 opts:
   check_path: true # Check if the path exists, assuming the path is available to the container
   max_retries: 5 # Exponential backoff when a target fails

 triggers:
   sonarr:
     type: sonarr
     rewrite:
       from: "/data/_01 SERIES"
       to: "/media/cous/DATA/_DATA/_01 SERIES"
   sonarr2:
     type: sonarr
     rewrite:       
       from: "/data/_03 ANIMES"
       to: "/media/cous/DATA/_DATA/_03 ANIMES"
   sonarr3:
     type: sonarr
     rewrite:       
       from: "/4tousb/series"
       to: "/media/cous/DATA/_DATA/_01 SERIES"

 webhooks:
   discord:
     type: "discord"
     url: "https://discord.com/api/"

 targets:
   plex:
     type: plex
     url: http://192.168.34.1:32400
     token: XXXXXXXXXXXXXXXXXXXXXXXX

image image image