Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude flag (-e) broken in Sonarr #79

Open
KaiStarkk opened this issue Dec 30, 2022 · 1 comment
Open

Exclude flag (-e) broken in Sonarr #79

KaiStarkk opened this issue Dec 30, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@KaiStarkk
Copy link

Exclude flag (-e) not adding exclusions to the Sonarr lists (Settings -> Import Lists -> Import List Exclusions)

The first run worked, but subsequent runs won't append to the list.
I've tried manually deleting all the Sonarr exclusions but it wouldn't work on first run again.

This works correctly in Radarr, but not Sonarr.

Versions:
excludarr v1.0.7
python 3.10.2
sonarr 3.0.9.1549

Also suggest it may be helpful to rename excludarr's exclusions to 'ignore' or similar, to avoid confusion.

@KaiStarkk KaiStarkk added the bug Something isn't working label Dec 30, 2022
@KaiStarkk
Copy link
Author

The correct usage of API seems to be as below:

# Sonarr API configuration
api_key = "{API_KEY}"
base_url = "http://{HOST}:{PORT}/api/v3/importlistexclusion"

headers = {
    "accept": "text/plain",
    "Content-Type": "application/json"
}

for title, tvdb_id in tvdb_ids.items():
    if tvdb_id is not None:
        data = {
            "tvdbId": tvdb_id,
            "title": title
        }

        response = requests.post(
            f"{base_url}?apikey={api_key}",
            headers=headers,
            json=data
        )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant