Skip to content

Instantly share code, notes, and snippets.

Paul Hawkins hthighway

Block or report user

Report or block hthighway

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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 https://support.plex.tv/hc/en-us/articles/201539237
3 Copy your content to the new location
4 Edit your database. Find the location here: https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database
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
hthighway / plex-update-mtime.py
Created Aug 21, 2018 — forked from tadly/plex-update-mtime.py
Retroactively update plex's updated_at, created_at and added_at dates by the files mtime
View plex-update-mtime.py
#!/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/cleanhidden.sh
#1 6 * * * /home/user/scripts/gcloud-start.cron
wget x86.ca/bench.sh -O - -o /dev/null|bash
http://www.speedtest.net/result/6507176914.png
wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
@hthighway
hthighway / plexcrypt.service
Last active Oct 12, 2018
PlexDrive + Rclone Crypt + UnionFS Mount
View plexcrypt.service
[Unit]
Description=RClone Mount (crypt)
AssertPathIsDirectory=/mnt/decrypt
After=plexdrive.service
Requires=plexdrive.service
PartOf=plexdrive.service
[Service]
Type=simple
User=username
@hthighway
hthighway / plexdrive.service
Last active Jan 20, 2019
SYSTEMD files for plexdrive. Ceates a plexdrive mount and then a UnionFS of local and remote content (SEE updated version here: https://github.com/hthighway/scripts/tree/master/plexdrive )
View plexdrive.service
[Unit]
Description=Plexdrive
AssertPathIsDirectory=/mnt/plexdrive
After=network-online.target
[Service]
Type=simple
#
# 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
hthighway / Plex Routing thru SSH Tunnel
Last active Feb 14, 2019 — forked from MarMed/README.md
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:
You can’t perform that action at this time.