[HowTo] Plex database modification - Moving media the right/wrong way

I opened up my database using http://sqlitebrowser.org/
I manually updated section_locations using the tool. Then I ran these 3 SQL statements:

UPDATE metadata_items SET guid= replace(guid, 'file:///Users/jelwell/Shared', 'file:///Volumes/Movies') where guid like '%file:///Users/jelwell/Shared%' UPDATE media_streams SET url= replace(url, 'file:///Users/jelwell/Shared', 'file:///Volumes/Movies') where url like '%file:///Users/jelwell/Shared%' UPDATE media_parts SET file= replace(file, '/Users/jelwell/Shared', '/Volumes/Movies') where file like '%/Users/jelwell/Shared%'

Note that media_part uses a different reference notation than the rests. (no file:///).

I haven’t been able to drop the changes in place yet. I will try that later and report back.
Thanks,
Joseph Elwell.

1 Like