Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.38 KB | None | 0 0
  1. #plex must be stopped for database edits
  2. docker stop plex
  3. #create a copy of the plex database
  4. cp /opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db /opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-backup
  5. #open the plex database with sqlite3 (Unsure if sqlite3 is installed by default, believe so)
  6. sqlite3 /opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
  7.  
  8. #Update all references of `/unionfs/plexdrive/Movies` with `/mnt/unionfs/Media/Movies`
  9. UPDATE section_locations SET root_path= REPLACE(root_path, '/unionfs/plexdrive/Movies', '/mnt/unionfs/Media/Movies') WHERE root_path LIKE '%/unionfs/plexdrive/Movies%';
  10. UPDATE media_parts SET file= REPLACE(file, '/unionfs/plexdrive/Movies', '/mnt/unionfs/Media/Movies') WHERE file LIKE '%/unionfs/plexdrive/Movies%';
  11.  
  12. #Update all references of `/unionfs/plexdrive/Series` with `/mnt/unionfs/Media/TV`
  13. UPDATE section_locations SET root_path= REPLACE(root_path, '/unionfs/plexdrive/Series', '/mnt/unionfs/Media/TV') WHERE root_path LIKE '%/unionfs/plexdrive/Series%';
  14. UPDATE media_parts SET file= REPLACE(file, '/unionfs/plexdrive/Series', '/mnt/unionfs/Media/TV') WHERE file LIKE '%/unionfs/plexdrive/Series%';
  15.  
  16. #ctrl + d to quit from sqlite3
  17.  
  18. docker start plex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement