Skip to content

Instantly share code, notes, and snippets.

View gist:31b610640242f97e29e42976745b0d70
Repair (dump and import):
1. cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
2. sqlite3 com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
3. sqlite3 com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
4. sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
5. rm com.plexapp.plugins.library.db
6. sqlite3 com.plexapp.plugins.library.db < dump.sql
View gist:d687a9fc07b2af55756e5a8aac94df12
1 Shutdown plex server
2 Backup your data
3 Copy your content to the new location
4 Edit your database. Find the location here:
5 There are 4 edits you'll need to make (change pathing to appropriate values):
UPDATE section_locations
SET root_path= replace(root_path, '/Users/jelwell/Shared', '/Volumes/Movies')
where root_path like '%/Users/jelwell/Shared%'
hthighway /
Created Aug 21, 2018 — forked from tadly/
Retroactively update plex's updated_at, created_at and added_at dates by the files mtime
#!/usr/bin/env python3
# Most importantly:
# 1. Use at your own risk!
# 2. You may consider creating a backup because this script doesn't
# 3. Only tested on linux
# What does this script do?
# Whenever you scan for new items, plex will set the respective dates to
# the CURRENT time rather than the files mtime.
View gist:2184b056f879a2edbaea3ab6e25dc11f
STOP: docker stop $(docker ps -aq)
START (no Watchtower): docker start $(comm -13 <(docker ps -a -q --filter="name=watchtower" | sort) <(docker ps -a -q | sort))
STOP & DISABLE unionfs_cleaner.service
STOP & DISABLE unionfs.service
STOP plexdrive & rclonemount services
sudo cp ~/service.bak/plexdrive.service /etc/systemd/system/
cp /opt/plexdrive/plexdrive-latest /opt/plexdrive/plexdrive
View Random stuff
#*/30 * * * * /home/user/scripts/
#1 6 * * * /home/user/scripts/gcloud-start.cron
wget -O - -o /dev/null|bash
wget --output-document=/dev/null
hthighway / plexcrypt.service
Last active Oct 12, 2018
PlexDrive + Rclone Crypt + UnionFS Mount
View plexcrypt.service
Description=RClone Mount (crypt)
hthighway / plexdrive.service
Last active Mar 16, 2021
SYSTEMD files for plexdrive. Ceates a plexdrive mount and then a UnionFS of local and remote content (SEE updated version here: )
View plexdrive.service
# uid & gid values are for the user that you want to run plexdrive, $id will give you the values for the logged in user
hthighway / Plex Routing thru SSH Tunnel
Last active Aug 24, 2022 — forked from MarMed/
Routing plex traffic through an SSH tunnel
View Plex Routing thru SSH Tunnel
#Routing plex traffic through an SSH tunnel
This guide creates a reverse SSH tunnel to route all Plex server traffic through it.
Step 2 is done on the tunnel, all other steps are done on the plex server.
#1. Setup SSH keys (if you already have key based authenthication setup skip to step 2)
On plex server: