|
|
@ -1,5 +1,5 @@
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
scriptVersion="1.0.007"
|
|
|
|
scriptVersion="1.0.008"
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
|
|
|
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
|
|
|
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
|
|
|
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
|
|
@ -18,12 +18,13 @@ if [ -f "/config/logs/QueueCleaner.txt" ]; then
|
|
|
|
find /config/logs -type f -name "QueueCleaner.txt" -size +1024k -delete
|
|
|
|
find /config/logs -type f -name "QueueCleaner.txt" -size +1024k -delete
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
exec &>> "/config/logs/QueueCleaner.txt"
|
|
|
|
touch "/config/logs/QueueCleaner.txt"
|
|
|
|
chmod 777 "/config/logs/QueueCleaner.txt"
|
|
|
|
exec &> >(tee -a "/config/logs/QueueCleaner.txt")
|
|
|
|
|
|
|
|
chmod 666 "/config/logs/QueueCleaner.txt"
|
|
|
|
|
|
|
|
|
|
|
|
log () {
|
|
|
|
log () {
|
|
|
|
m_time=`date "+%F %T"`
|
|
|
|
m_time=`date "+%F %T"`
|
|
|
|
echo $m_time" :: QueueCleaner :: "$1
|
|
|
|
echo $m_time" :: QueueCleaner :: $scriptVersion :: "$1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
arrQueueData="$(curl -s "$arrUrl/api/v3/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownMovieItems=true&apikey=${arrApiKey}" | jq -r .records[])"
|
|
|
|
arrQueueData="$(curl -s "$arrUrl/api/v3/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownMovieItems=true&apikey=${arrApiKey}" | jq -r .records[])"
|
|
|
|