|
@@ -1,10 +1,11 @@
|
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Config
|
|
# Config
|
|
|
-CURL_TIMEOUT=10
|
|
|
|
|
|
|
+CURL_TIMEOUT=5
|
|
|
RESTART_DELAY=120
|
|
RESTART_DELAY=120
|
|
|
PMS_URL="http://localhost:32400/"
|
|
PMS_URL="http://localhost:32400/"
|
|
|
UNWATCHED_URL="${PMS_URL}library/sections/2/unwatched"
|
|
UNWATCHED_URL="${PMS_URL}library/sections/2/unwatched"
|
|
|
|
|
+UNWATCHED_TIMEOUT=$(( $CURL_TIMEOUT * 3 ))
|
|
|
MIN_UNWATCHED_COUNT=10
|
|
MIN_UNWATCHED_COUNT=10
|
|
|
ADMIN_EMAIL="zach@kotlarek.com"
|
|
ADMIN_EMAIL="zach@kotlarek.com"
|
|
|
|
|
|
|
@@ -41,7 +42,7 @@ while [ $LOOP -ne 0 ]; do
|
|
|
|
|
|
|
|
# Ask Plex for a list of unwatched TV series
|
|
# Ask Plex for a list of unwatched TV series
|
|
|
if [ -z "${FAILED}" ]; then
|
|
if [ -z "${FAILED}" ]; then
|
|
|
- PAGE="`curl --silent --max-time "${CURL_TIMEOUT}" "${UNWATCHED_URL}"`"
|
|
|
|
|
|
|
+ PAGE="`curl --silent --max-time "${UNWATCHED_TIMEOUT}" "${UNWATCHED_URL}"`"
|
|
|
if [ -z "${PAGE}" ]; then
|
|
if [ -z "${PAGE}" ]; then
|
|
|
FAILED="HTTP timeout"
|
|
FAILED="HTTP timeout"
|
|
|
else
|
|
else
|