buildarr / buildarr-sonarr

Sonarr PVR plugin for Buildarr
https://buildarr.github.io/plugins/sonarr
GNU General Public License v3.0
2 stars 4 forks source link

Add support for Sonarr V4 #7

Open Callum027 opened 1 year ago

Callum027 commented 1 year ago

The Prowlarr plugin determined the Buildarr-side framework for supporting an application that requires authentication by default, and the example Ansible playbooks prove that fully automating deployments of such applications is possible.

Therefore, it is time to start looking at introducing support for Sonarr V4 in this plugin.

Ideally this should be done before Sonarr V4 goes stable, or not too long afterwards.

Callum027 commented 11 months ago

Sonarr V4 adds support for NameEmail types in email notification connections.

Add support for both EmailStr and NameEmail in the plugin, using a validator to return an str if the name and the address part of the email address is the same, otherwise a NameEmail.

rasmus-kirk commented 7 months ago

Any news on this?

Callum027 commented 6 months ago

Hi @rasmus-kirk, thanks for taking an interest in Buildarr, and sorry for the late reply (I've been on a break for a while).

I've got some refactors to do before I can get started on this (mainly, I have to upgrade all of the Buildarr libraries to Pydantic V2) but once that is done, this is the first thing I will get started on. Supporting most of the Sonarr V4 APIs is not a massive amount of work, but some new things need to be implemented (e.g. Custom Formats).

I will update this issue as I work on things to keep people in the loop.

rasmus-kirk commented 6 months ago

That's great news! Not supporting V4 is the biggest reason why I'm not using this at the moment. Couple of questions:

I don't know how difficult it would be to add support to other "*Arrs", so I don't expect anything, just curious.

Callum027 commented 6 months ago
  • Do you plan on maintaining this for a while?

The main reason I made Buildarr is to use it myself. From my perspective there is no better alternative to managing *Arr instance configuration either available or in development, so I will maintain it as long as it is useful to people.

  • Is support for Lidarr/Readarr on the table?

I don't know how difficult it would be to add support to other "*Arrs", so I don't expect anything, just curious.

It's not difficult to add support for a new *Arr, as at this point the formula is relatively stabilised for creating a new plugin. It does, however, take a little bit of time (a week or two to make something functional and tested).

All the plugins I've made so far I've done because I currently use them. I'm also interested in Lidarr and Readarr, so I'll be happy to make new plugins for them (once everything else has been stabilised post-refactor). And if they're plugins other people would also get use out of, that's good as well.

rasmus-kirk commented 6 months ago

Thank you! This clears things up for me.

ChadTaljaardt commented 6 months ago

Hello @Callum027

Is there any main issues that you need assistance with? I currently use Sonarr v4 and would like to help in my free time to make this supported if you need.

Callum027 commented 6 months ago

Hello @Callum027

Is there any main issues that you need assistance with? I currently use Sonarr v4 and would like to help in my free time to make this supported if you need.

Hi @ChadTaljaardt, thanks for offering to help with this.

From a Sonarr V4 perspective, in terms of priorities, the following needs to be done:

  1. Fix any incompatibilities with Sonarr V4 (such as this issue) so it can be used with Buildarr (even if new features are not yet supported), while maintaining compatibility with Sonarr V3.
  2. Add support for the new Sonarr V4 configuration structures, such as Custom Formats (ideally using the sonarr-py library, which I haven't yet adopted in this plugin).
  3. Add unit tests for the new features (I haven't added any testing infrastructure to the plugin repos yet, but it is in the works).

If we could start working on things in that order, that would be fantastic.

Callum027 commented 6 months ago

The following PR which adds basic Radarr V5 support to the Radarr plugin is a good reference for step 1:

https://github.com/buildarr/buildarr-radarr/pull/16

ChadTaljaardt commented 5 months ago

Just a small update to this, it looks like sonarr-v4 is now released and out of beta so is the default version provided now. I am wondering if there is value in still supporting sonarr v3 given that its a old release now and everything is v4 by default now.