Auto search for movie on addition to Radarr

This commit is contained in:
Parker M. 2024-05-19 19:04:57 -05:00
parent 4146a188f5
commit eb5a999dac
No known key found for this signature in database
GPG Key ID: 95CD2E0C7E329F2A

View File

@ -136,6 +136,12 @@ class RequestButtonView(discord.ui.View):
color=0xD01B86,
)
await interaction.response.edit_message(embed=embed, view=None)
# Force Radarr to search for the movie
requests.post(
f"{RADARR_HOST_URL}/api/v3/command",
headers=RADARR_HEADERS,
json={"name": "MoviesSearch", "movieIds": [movie_id]},
)
# Keep track of the movie for the `/status` command
db = sqlite3.connect("cordarr.db")