Tags. Within database, how to script

I’ve created tags within Sonarr to filter “my” selection of TV Shows to display. If I moved those in the backend to a new NAS location, those tag would no longer filter my shows correctly.

If I look in the database there are two tables, tag and tag_link. The table “tag” is straight forward it has the name of my tag and an “tag_id” Sonarr has assigned to that tag.

In the tag_link table there are three fields; tag_id (from tag:tag_id), media_type, which equals "tvshow).

But the field “meida_id” I have no idea where this is value is pulled from. This is the great unknown. If I could figure out where this is pulled from, then when the TV Series is moved, my tags could follow.


Sonarr does not have a tag_link table (or any table with an _ in the name or column name).

Tags in Sonarr are linked to series, as long as you don’t delete the series from Sonarr the tags will be there if you exit the path.

Your correct. I should have directed this question to Kodi forum. Since its related to the Kodi mysql database…