RiffSphere / Collectarr

36 stars 0 forks source link

Run as a daemon / add webhook trigger from Radarr #2

Closed jangrewe closed 3 years ago

jangrewe commented 3 years ago

Hi, i like the idea of Collectarr and took it for a quick spin, and it works very nicely! I was just wondering if it was maybe possible to run the script as a daemon (in the Docker container), instead of having to run the container via e.g. a cronjob every once in a while.

And if it already runs as a daemon: You could then also integrate Radarr's webhook functionality to ping Collectarr when a movie gets added, so that Collectar can add the whole collection of that movie. Just an idea... ;-)

RiffSphere commented 3 years ago

While this sounds like a good idea, I got some thoughts about it.

1) Isn't it wasting resources unnecessary? Certainly the collection adding should be really fast (depending on how many movies you got, pulling the list takes the longest time). It will be sitting there idle 99% of the time for nothing.

2) Once you get into "smart lists", this can conflict with other uses of your tmdb API, or even bandwidth querying tmdb. Heavy scheduling will be needed while cronjobs already allow for that.

3) The webhook would probably be a nice idea, but will require a complete new function (apart from some basic webserver) to pull just 1 movie from radarr and add that collection. With the current way, I can see infinite loops popping up (collectarr adding a list, radarr pulling a movie from the list, triggering collectarr ...), putting stress on radarr while it's scanning it's lists. I might have some thinking about this, since it sounds like a nice feature or spinoff.

RiffSphere commented 3 years ago

@jangrewe Looking through the options, I don't see an "On Add" option in the connection options. Even worse, all options seem to me like they occur after a download is started, and will not add the collection until the movie is released/leaked. Do you see another way to trigger on movie add?

Cause if that option does not exists and wont work for all movies, a "normal" run will have to be done every so often anyway, and then it's a lot of work for an unreliable feature.

RiffSphere commented 3 years ago

No trigger condition in sonarr v3