[Guide] Adding/editing Plex edition tags using simple SQL commands. No PlexPass Required.
In this guide I will explain how to add edition tags to movies or alter already existing ones. This guide assumes you have access to the plex database.
Limitations
While this solution enables anyone to add/remove edition tags that will show up in any app/website that supports them. Some features are still be restricted to PlexPass subscribers such as displaying other editions on the movie details page.
Method
1. Identify your plex database location.
Generally your database should be located here:
[Plex data directory]/Plug-in Support/Databases.
But depending on your system [Plex data directory] will be different.
Here is a list of common directories.
2. Identify your plex binary location.
This might be a little more difficult as there is no nice pre-made list as there is with the data-directory. Try googling a little.
In my case the path is /volume3/@appstore/Plex Media Server/Plex Media Server, since I installed plex in Volume 3 on my Synology.
If you are unable to locate your plex binary you may still be able to continue if you have sqlite3 installed on your system. Though I have not tested this solution.
3. Connecting to the database
Open your terminal and make sure you can access the plex binary. If your plex binary is on a server or in a docker container you may have to access it using ssh. In my case I have to use ssh: ssh Quark95@123.69.10.420.
You may have to enable ssh access on your system.
Now we can connect to the database using SQLite. The command will look like this: "[Plex binary path]" --sqlite "[Plex Data directory]/Plug-in Support/Databases/com.plexapp.plugins.library.db".
Alternatively you could try sqlite3 "[Plex Data directory]/Plug-in Support/Databases/com.plexapp.plugins.library.db"
And for reference my command looks like this: "/volume3/@appstore/Plex Media Server/Plex Media Server" --sqlite "/volume3/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
Now a prompt should appear that looks like this:
sqlite>
4. Finding IDs
Now you'll need to find the ID of the movie(s) you want to edit. To do this, find the movie in your plex library on desktop, in the ... menu select Get Info and press View XML. In the XML file that opens you'll find the id as a string here: <Video ratingKey="108014". Where in this case 108014 is the id.
5. Editing the database
Before you continue I must warn you that editing the database in this way is not supported and if done incorrectly, can in a worst case scenario corrupt the plex database. However, as we are doing only minor changes, I feel it is relatively safe.
Here are some examples of common commands I've found useful:
Remember to change <your movie id>, <old tag> and <new tag> or you may get an error.
Add/edit edition tag for a single item:
UPDATE metadata_items SET edition_title = "<new tag>" WHERE id = <your movie id>;
Add/edit tag for a list of items:
UPDATE metadata_items SET edition_title = "<new tag>" WHERE id in (<your movie id>, <your movie id>, <your movie id>);
Edit all instances of a tag from <old tag> to <new tag>:
UPDATE metadata_items SET edition_title = "<New tag>" WHERE edition_title = "<old tag>";