vche / pycliarr

Python client for radarr and sonarr apis. The package provides python client and CLI to use in command line.
MIT License
13 stars 1 forks source link

addImportExclusion for Sonarr #19

Closed marc0janssen closed 2 years ago

marc0janssen commented 2 years ago

Hi Vivien....

It is not working for the Sonarr API.... I checked the webz and there need to be a addImportExclusion: bool too for SONARR!

Can you please verify???

vche commented 2 years ago

I've checked yesterday and didn't find the option sonarr to exclude the file [in the api(https://github.com/Sonarr/Sonarr/wiki/Series). Did you find documentation that this can be done using the api ?

marc0janssen commented 2 years ago

delete_series(series_id: Optional[int] = None, tvdb_id: Optional[int] = None, addImportExclusion: bool = False, deleteFiles: bool = False)→ arrapi.objs.reload.Series[source] Gets a Series by one of the IDs and deletes it from Sonarr.

Parameters series_id (Optional[int]) – Search by Sonarr Series ID. tvdb_id (Optional[int]) – Search by TVDb ID. addImportExclusion (bool) – Add Import Exclusion for this Series. deleteFiles (bool) – Delete Files for this Series. Returns Series for the ID given.

Return type Series

Raises ValueError – When no ID is given. NotFound – When there’s no series with that ID or when the Series hasn’t been added to Sonarr.

marc0janssen commented 2 years ago

https://arrapi.readthedocs.io/en/latest/sonarr.html

vche commented 2 years ago

Did you test this ?

That's pycliarr method. Under the hood I'm calling an api of sonarr. And while I did in sonarr similar to radarr, adding an "AdddExclusion" parameter to the request, sonarr does not document it.

However, checking sonarr soruce code, they seem to have implemented this in their v3 api they just didn't documented it.

I'll work on an update to fully move to api v3 and support this, but i'll need to do a complete retest of every command, this may take some time

marc0janssen commented 2 years ago

No I haven't tested this... sorry.

For me there is NO(!!) rush Vivien... I appreciate it very much, the work you do, I would love it to have but no(!) deadline...

Thank you!

vche commented 2 years ago

It was actually not as long as i thought. Implemented in release .16 Also added notification, blocklist, and tag apis. So that we can create,list, and remove tags. Also provide list of series/movies for a specific tag

marc0janssen commented 2 years ago

Yo, that's quick!! Thanks!! I will check the tags out too!!!! Thanks a lot Vivien!!!!

vche commented 2 years ago

reopening to confirm if the api is implemented in radarr

marc0janssen commented 2 years ago

Sorry Vivien, I am not sure where to reopen a ticket... I will check this out..

vche commented 2 years ago

display the closed tickets and comment using the « comment and re open’. I already reopened it for you. i will check if radarr implements it but i can do much it it doesn’t.

marc0janssen commented 2 years ago

Thanks this helps…. Sorry for the inconvenience On 26 Nov 2021, 12:21 +0100, Vivien Chene @.***>, wrote:

display the closed tickets and comment using the « comment and re open’. I already reopened it for you. i will check if radarr implements it but i can do much it it doesn’t. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

vche commented 2 years ago

I've captured the gui traffic to reverse engineer the requests used by the front end and they're using a different name "addImportListExclusion".

I've also got the undocumented inclusion apis, which are different as well between sonarr and radarr. As this is quick i will fix this add apis for this the inclusion list to allow listing and removing the exclusions later today.

marc0janssen commented 2 years ago

Great work! Thanks again! On 26 Nov 2021, 13:01 +0100, Vivien Chene @.***>, wrote:

I've captured the gui traffic to reverse engineer the requests used by the front end and they're using a different name "addImportListExclusion". I've also got the undocumented inclusion apis, which are different as well between sonarr and radarr. As this is quick i will fix this add apis for this the inclusion list to allow listing and removing the exclusions later today. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

vche commented 2 years ago

Just missing some unit tests, i will add them next week. Re opening the ticket just so that you can confirm everything works an re close it yourself after testing.

marc0janssen commented 2 years ago

Tested this to ... TV shows show up in in the exclusions list in Sonarr.... Merci for this too, code-wizard!

vche commented 2 years ago

:) de rien / you're welcome.

please close this issue once you have successfully tested everything on your end (no rush, take your time).

marc0janssen commented 2 years ago

Yep all is fine.... In v3 the queue json-response is different so I need some rework in the code!

The API is fine, merci!