Bulk switch library agent to Plex Movie and refresh metadata

My Plex library is very old. I’ve been maintaining it for years, it’s very large, and I’d rather not re-discover the entire contents.
Some years ago, before the “Plex Movie” agent was introduced or due to instability in default agents, I was using the TMDb agent and a fair portion of my movie library are still stored using this older agent’s metadata. My library has been set to Plex Movie for a long time and all new additions are properly matched with it. But my older items remain using TMDb unless I manually Fix Match on a 1-by-1 basis, which is clearly impossible for thousands of titles.

I cannot figure out a way to force a re-match using the newer agent in bulk.

If I ‘Refresh All Metadata’ of the library, all titles are refreshed against the agent they are already using, Plex Movie for newer or manually switched, and TMDb for older. If I select ‘Refresh Metadata’ from the individual title, same behavior. I have to click ‘Fix Match’ > Search Options > Search & click title in order to manually update the agent.

I’m perfectly comfortable manually editing the sqlite database if anyone can think of a clever way to force all titles to use the Plex Movie agent on a mass metadata refresh, otherwise it will take me a couple years to get through updating everything…

I think I just figured it out myself after performing a POC on a single title:
UPDATE metadata_items SET guid = '' where id = <id>
I selected a single movie whose agent was using TMDb (the guid field will look like “com.plexapp.agents.themoviedb://1234”) and removed the value. This made Plex think the title was completely unmatched. Manually running Refresh Metadata successfully rematched against Plex Movie agent and downloaded the right metadata.
After backing up the database I run the following:
UPDATE metadata_items SET guid = '' where library_section_id = 2 and guid like 'com.plexapp.agents.themoviedb%';
Which removed TMDb agent from about 1000 titles.
Now I ran Refresh All Metadata on library and am waiting to see if the older titles get rematched properly.

I think this should be a feature of the Library when the agent is modified in the Advanced settings.

1 Like

Yep, all titles matched against the Library default agent and are fetching metadata successfully now. Just sitting back and waiting for it to complete so I can manually mop up and mismatches.

Just setting the guid to '' on every Movie allowed “refresh metadata” to work.

Great tip, thanks!

Could you elaborate on how to execute these commands against the databases? I’m running Ubuntu Host docker container.

Spuniun, could you please elaborate on how you did it, I am in the same situation. I can update the metadata on a single movie but not bulk. TIA
Mike

you must edit your library database directly with a sqlite client

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.