This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#*/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=RClone Mount (crypt) | |
AssertPathIsDirectory=/mnt/decrypt | |
After=plexdrive.service | |
Requires=plexdrive.service | |
PartOf=plexdrive.service | |
[Service] | |
Type=simple | |
User=username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: | |