Server Version#: 4.145.1
Player Version#: (various)
( I hope I’m posting this to the run area – my apologies if I’m not. )
I was wondering (1) if it’s possible to change metadata for an existing TV show episode, and if so, (2) what’s the best way to do this from the command line…?
Background: My Plex server runs on Ubuntu 24.xx. The Plex DVR records “Modern Marvels” (OTA), but the resulting metadata is wrong (if you dig around on the Internet for program information for Modern Marvel episodes, you’ll find that different source have conflicting information).
I played around with both ChatGPT and Google Gemini, and I discovered that if I was them for data (e.g., in a Plex-friend, XML NRO file format), I get the proper information. This led me to creating a Python script to go query Gemini and parse the returned data. So far, so good.
I would like to replace the existing “broken” metadata with the “good” data that I get via my script. I went back to Gemini and asked it to create a Python script to replace the existing metadata (title, summary, etc) for given TV show episode. According to Gemini, I should be able to use the Python “plexapi” library, but I spent hours trying to create a script that successfully changes the data, but alas, I was not successful – the test script successfully pulls the (incorrect) metadata from the local Plex server, and I use some calls that Gemini suggested in order to update the information (and no errors are generated), but the next time I pull the data, I still get the old, broken data.
I also Googled plexapi, and from what I could gather, plexapi does not have any facility to write metadata to the Plex server database. That caught me off-guard – if it doesn’t have the ability to write metadata, I’m wondering why Gemini (as well as ChatGPT) suggest to use plexapi…? :-?
After more searching, I did see something that looked like metadata could be written to the Plex database using POST operations (via HTML/HTTP like calls) on the server, but the example script I found was different enough from what I’m looking for that I wasn’t sure it really would do what I need.
Thoughts?
advTHANKSance.