Page 1 of 1

[linux] update plex after download

Posted: August 14th, 2012, 4:14 am
by sharkzor
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.

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

Re: [linux] update plex after download

Posted: September 23rd, 2012, 6:00 pm
by juvenile38
Sorry if this is a stupid question but, would this work for Mac? And what do you mean by corresponding section?