[linux] update plex after download
Posted: August 14th, 2012, 4:14 am
It's stupid to let plex check every hour/day on new downloads if only sabnzbd provides content. The script below triggers plex to refresh the library.
Should help increase the spindown time of your disk(s).
Change x.x.x.x to the ip of the machine running plex media server and 1 / 3 to your corresponding section.
Should help increase the spindown time of your disk(s).
Change x.x.x.x to the ip of the machine running plex media server and 1 / 3 to your corresponding section.
Code: Select all
#! /bin/bash
if [ "$7" = "0" ]; then
if [ "$5" = "movies" ]; then
wget -q --delete-after "http://x.x.x.x:32400/library/sections/1/refresh" > /dev/null
elif [ "$5" = "tv" ]; then
wget -q --delete-after "http://x.x.x.x:32400/library/sections/3/refresh" > /dev/null
fi
fi