Yes, I'm using Custom mode, and I went to http://192.168.1.2:32400/library/sections to find out my section number for TV Shows, which is 6.mannibis wrote:Ok, so it didnt ERROR. That's good. How are you configuring it? I would suggest using Custom mode and using Section #'s because Auto mode relies on the category setting and not sure if NZBPO_Category or whatever it is, is used for Scheduler scripts. Try Custom mode and put in the section #'s (1,2,3, etc.)
Code: Select all
def refreshCustomSections(rawPlexSections,plexIP):
plexSections=rawPlexSections.replace(' ','')
plexSectionsSplit=plexSections.split(',')
params = {
'X-Plex-Token':getAuthToken(plexUsername,plexPassword)
}
for plexSection in plexSectionsSplit:
url = 'http://%s/library/sections/%s/refresh?force=1' % (plexIP, plexSection)
Thank you, but as I wrote above, I did try that. Without any luck. I don't understand why it would work in the browser, but not in the script.mannibis wrote:That's odd. Perhaps it needs a force refresh. Try altering the URL in the .py to add the force=1 parameter.
Code: Select all
def refreshCustomSections(rawPlexSections,plexIP): plexSections=rawPlexSections.replace(' ','') plexSectionsSplit=plexSections.split(',') params = { 'X-Plex-Token':getAuthToken(plexUsername,plexPassword) } for plexSection in plexSectionsSplit: url = 'http://%s/library/sections/%s/refresh?force=1' % (plexIP, plexSection)
Code: Select all
for elem in tree.getiterator('Directory'):
if (elem.attrib['type'] == 'show'):
tvSections.append(elem.attrib['key'])
elif (elem.attrib['type'] == 'movie'):
movieSections.append(elem.attrib['key'])
Users browsing this forum: No registered users and 27 guests