Skip to content

Instantly share code, notes, and snippets.

@jk0
Last active September 12, 2017 14:31
Show Gist options
  • Save jk0/665d172b3c03df5fb31ea7676093b9ff to your computer and use it in GitHub Desktop.
Save jk0/665d172b3c03df5fb31ea7676093b9ff to your computer and use it in GitHub Desktop.
#!/bin/bash
CWD="/home/<USER>/Incoming/$2"
echo "Start post processing for: $CWD" >> /tmp/deluge.log
cd "$CWD"
/home/<USER>/src/unrarall/unrarall -s --clean=all "$CWD" 2>> /tmp/deluge.log
exiftool -all= -ext mp4 -ext m4v -ext avi -R "$CWD"
chown -R <USER>:users "$CWD"
chmod -R 755 "$CWD"
# https://forums.plex.tv/discussion/129922/how-to-request-a-x-plex-token-token-for-your-app/p1
#curl -s http://plex:32400/library/sections/2/refresh?X-Plex-Token=<TOKEN> 2>> /tmp/deluge.log
#curl -s http://plex:32400/library/sections/9/refresh?X-Plex-Token=<TOKEN> 2>> /tmp/deluge.log
echo "Stop post processing for: $CWD" >> /tmp/deluge.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment