ManiMatter / decluttarr

Watches radarr, sonarr, lidarr, readarr and whisparr download queues and removes downloads if they become stalled or no longer needed.
GNU General Public License v3.0
99 stars 15 forks source link

[Feature Request] Whisparr #111

Closed pops64 closed 1 month ago

pops64 commented 1 month ago

I hate to be the only person that enjoys adult fun time :P but I would love to see your script support its API as well.

ManiMatter commented 1 month ago

Want to contribute with a PR? ;)

pops64 commented 1 month ago

I prefer you to do it. You haven't setup outside access to the necessary files for me to effect the change. And I don't really feel like learning how to build and run local docker images.

ManiMatter commented 1 month ago

you dont need to build any images. clone the git to your local machine and run the main.py. Then you alter the code in the respective files until you are happy and create a PR.

pops64 commented 1 month ago

I am running it off an Arch headless server with minimal packages. Which limits my options. I just brute forced it. Since you don't have it set to mount files, I think this is the right term. I just mounted the apps directory to a local host volume and placed all your files in there. It appears to be working correctly. I have gone through and added whipsarr to all necessary files. The API call is the same as Sonarr. I have two stalled files currently for testing purposes I will let your know if it errors out

ManiMatter commented 1 month ago

sweet. just on top of my mind, i think these files here need a change:

pops64 commented 1 month ago

EDITED: for clarity

Didn't get to updating readme file yet. The remove_unmonitored.py threw an error. That is how figured out I missed that file. Main.py also performs an version check. I have set it to my current version of Whisparr unless you want a different version specified

ManiMatter commented 1 month ago

not sure i understand your last post.

version: suggest you put a version that works. can be today's version, for me that's fine.

The remove_unmonitored through a code. How I figured that one out.

is that a question how to change it? you need to check the API response form whisparr to understand how to parametrize it. look at sonarr and radarr, and do the corresponding thing for whisparr

Based on Whisparr API Doc, looks like they also use episodeId (same way as Sonarr), thus code for remove_unmonitored would probably be (untested):

           elif arr_type == 'WHISPARR': 
                isMonitored = (await rest_get(f'{BASE_URL}/episode/{str(queueItem["episodeId"])}', API_KEY))['monitored']