[HELP] Plex update script ?

Come up with a useful post-processing script? Share it here!
Post Reply
shadytree
Newbie
Newbie
Posts: 27
Joined: February 15th, 2009, 6:22 am

[HELP] Plex update script ?

Post by shadytree »

I looked through the forum and see a suggestion, but can't get it to work.
Anyone got a working Plex update script please ?

(same style as sickbeards, push to Plex update)

Would like to assign to certain folders only.

thanks in advance.
shadytree
Newbie
Newbie
Posts: 27
Joined: February 15th, 2009, 6:22 am

Re: [HELP] Plex update script ?

Post by shadytree »

Still, struggling to get this sussed, but I found this command on the PLEX forum, but still can't get it to work in the form of a post processing script.

This is the actual command I wish SAB to send to my Plex library is >>>

http://192.168.0.22:32400/library/sections/1/refresh
Last edited by shadytree on January 8th, 2015, 12:07 am, edited 1 time in total.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: [HELP] Plex update script ?

Post by sander »

on which OS is SAB running?
shadytree
Newbie
Newbie
Posts: 27
Joined: February 15th, 2009, 6:22 am

Re: [HELP] Plex update script ?

Post by shadytree »

Running in Linux on a QNAP server, so needs to be a Python script.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: [HELP] Plex update script ?

Post by sander »

shadytree wrote:Running in Linux on a QNAP server, so needs to be a Python script.
Does

Code: Select all

lynx --dump http://192.168.0.22:32400/library/sections/1/refresh
start the refresh script?
shadytree
Newbie
Newbie
Posts: 27
Joined: February 15th, 2009, 6:22 am

Re: [HELP] Plex update script ?

Post by shadytree »

No, it gives the following error msg

line 1
{\rtf1\ansi\ansicpg1252\cocoartf1343\cocoasubrtf160
^
SyntaxError: unexpected character after line continuation character
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: [HELP] Plex update script ?

Post by sander »

Oh, then I can't help you. I thought you just had to trigger that script to let Plex update.
nock
Newbie
Newbie
Posts: 28
Joined: October 29th, 2014, 2:55 pm

Re: [HELP] Plex update script ?

Post by nock »

Pyhton script? Should work with just a easy bash scritp.. Either way, this is the code you need.
This is easy, this is my "movie" script:
Create a script and save it to your script folder ( sickberd/autoprocess folder etc..)

Code: Select all

#! /bin/bash
### Updates Plex movies ###
wget -q --delete-after "http://PLEX-SERVER-IP:32400/library/sections/6/refresh" > /dev/null
Replace the number "6" with the correct library number
Image

Now just add the script to a category
Image

You might want to make the script(s) executable sudo chmod +x..
shadytree
Newbie
Newbie
Posts: 27
Joined: February 15th, 2009, 6:22 am

Re: [HELP] Plex update script ?

Post by shadytree »

Thanks Nock, just what i was looking for. Will give that a try later.

To confirm, making it executable, is just

Code: Select all

'sudo chmod +x filename.sh' 
?
nock
Newbie
Newbie
Posts: 28
Joined: October 29th, 2014, 2:55 pm

Re: [HELP] Plex update script ?

Post by nock »

Yes, but you can drop ".sh"
shadytree
Newbie
Newbie
Posts: 27
Joined: February 15th, 2009, 6:22 am

Re: [HELP] Plex update script ?

Post by shadytree »

nock, I've done all above, and copied the new script to the correct folder, but its not visible in the sab config script dropdown?
I thought only python scripts were possible?
nock
Newbie
Newbie
Posts: 28
Joined: October 29th, 2014, 2:55 pm

Re: [HELP] Plex update script ?

Post by nock »

go to sab config -> folders -> Post-Processing Scripts Folder and make sure the path are correct
shadytree
Newbie
Newbie
Posts: 27
Joined: February 15th, 2009, 6:22 am

Re: [HELP] Plex update script ?

Post by shadytree »

nock wrote:go to sab config -> folders -> Post-Processing Scripts Folder and make sure the path are correct
Yep path is correct. I can see all my .py scripts for sickbeard and couchpotato etc, but not this new one. very odd
nock
Newbie
Newbie
Posts: 28
Joined: October 29th, 2014, 2:55 pm

Re: [HELP] Plex update script ?

Post by nock »

Try make a .txt, .py and see if you can see it etc. If you cant see it, i cant help you..
Post Reply