Can no longer update library database with sqlite3

Yes, I also initially tried running this with “–sqlite” (2 dashes) on Windows CMD and all it does is launch the Plex executable and does not update the database. So I tired with just one dash “-sqlite” and this is what works for me.
Yes, I’m able to update and write to my database with all kinds of different statements using this.
Here are some examples:

From Windows Command Prompt:

“C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe” -sqlite “com.plexapp.plugins.library.db” “UPDATE metadata_items SET title = ‘New Title’ WHERE id = ‘100’”

I prefer Powershell in my script, so you just have to add the ‘&’ before this to indicate it’s a command.
From Windows Powershell:

& “C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe” -sqlite “com.plexapp.plugins.library.db” “UPDATE metadata_items SET title = ‘New Title’ WHERE id = ‘100’”

If you are running this script from the same directory as the database, you don’t need to full path to the database, but if the script is somewhere else then you do need to full path.

Hope this helps.

3 Likes