Skip to content

Instantly share code, notes, and snippets.

@stahnma
Created May 8, 2020 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stahnma/baa73c766752e17c6aea4d4129d1abb2 to your computer and use it in GitHub Desktop.
Save stahnma/baa73c766752e17c6aea4d4129d1abb2 to your computer and use it in GitHub Desktop.
#!/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