[linux] update plex after download

Come up with a useful post-processing script? Share it here!
Post Reply
sharkzor
Newbie
Newbie
Posts: 5
Joined: May 13th, 2009, 2:18 pm

[linux] update plex after download

Post 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
juvenile38
Newbie
Newbie
Posts: 18
Joined: July 3rd, 2009, 1:39 pm

Re: [linux] update plex after download

Post by juvenile38 »

Sorry if this is a stupid question but, would this work for Mac? And what do you mean by corresponding section?
Post Reply