Skip to content

Instantly share code, notes, and snippets.

@martinbowling
Last active May 10, 2017 06:17
Show Gist options
  • Save martinbowling/653386f5b7a4b8426854fc01400f0bca to your computer and use it in GitHub Desktop.
Save martinbowling/653386f5b7a4b8426854fc01400f0bca to your computer and use it in GitHub Desktop.
# you will need to download nzbdrone.db & some type of sqlite editor
# First We Will Update The Series Table
# Replace the slashes
UPDATE Series SET path = replace( path, '\', '/' ) WHERE path LIKE '%:\%';
# K: is the windows drive that your files were on (replace this with whatever drive your files are on, will need to repeat for each
# windows root folder you have in Sonnar), /home/new/path/in/linux is well the new path in linux
UPDATE Series SET path = replace( path, 'K:', '/home/new/path/in/linux' ) WHERE path LIKE 'K:/%';
# Fix slashes in EpisodeFiles table
UPDATE EpisodeFiles SET RelativePath = replace( RelativePath, '\', '/' ) WHERE RelativePath LIKE '%\%';
# Fix slashes in ExtraFiles table
UPDATE ExtraFiles SET RelativePath = replace( RelativePath, '\', '/' ) WHERE RelativePath LIKE '%\%';
# Last but not least you will need to change the Table RootPaths to reflect changes from above, easier to do manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment