-
-
Save stahnma/baa73c766752e17c6aea4d4129d1abb2 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# First put the movie in the completed download directory for couch. | |
API_KEY=fdfecxxxxxxxxxxxxxxxxx | |
X_Plex_Token=adasdfasdflasjhflkjasdhfkjsh | |
curl "http://couchpotato.service.dc1.consul:5050/api/${API_KEY}/renamer.scan" | |
echo | |
ls -ltr /opt/media/movies | tail -1 | |
echo | |
v=1 | |
if [ "$1" = "movies" ] ; then | |
v=2 | |
elif [ "$1" = "kids" ] ; then | |
v=3 | |
fi | |
TV=1 | |
MOVIES=2 | |
KIDS=3 | |
URI=http://plex.service.dc1.consul:32400/library/sections/${v}/refresh?X-Plex-Token=${X_Plex_Token} | |
if [ "${DEBUG:-0}" -eq 1 ] ; then | |
echo "URI: " $URI | |
fi | |
curl $URI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment