radarr-collections
radarr-collections copied to clipboard
Is it possible to add a radarr tag?
Hi,
Great script! Is it possible to add a radarr tag to movies added by your script?
Thanks
Is it possible to add a radarr tag to movies added by your script?
Yes, it is possible. Tags are passed by ID, not by name, so you would need to know the ID of the tag you want to use.
To find your tag IDs, go to this URL:
http://<RADARR_IP_ADDRESS>:<RADARR_PORT>/api/v3/tag?apikey=<RADARR_API_KEY>
It will display all of your tags like this: (you'll need to create a tag like 'radarr_collections' first)
[
{
"label": "not_released_yet",
"id": 9
},
{
"label": "radarr_collections",
"id": 11
}
]
I'm not fluent in python, so someone else will need to confirm the code, but to make this work, I believe the logic would be to create a tags
variable in the Radarr settings that accepts an integer where you can enter the tag ID for the label of your choice:
https://github.com/RhinoRhys/radarr-collections/blob/92d7d495f3d8a55ca4fee2056684e1c23ac4a81f/config/rcm.default.conf#L1-L11
And then use that variable on line #189 where the tags array is passed through the post: https://github.com/RhinoRhys/radarr-collections/blob/92d7d495f3d8a55ca4fee2056684e1c23ac4a81f/rcm.py#L182-L191
Alternately, if @RhinoRhys wanted to force the tag to always be the same, the Tag API in Radarr has multiple options to check for, create, and update tags. If going this route, I would suggest adding a true|false
setting to allow users to toggle it on or off.
Ok, I decided to give it a shot and created a pull request. @RhinoRhys please feel free to deny it and just make the changes yourself if I missed anything. I already see I should've updated the readme with my change.