mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
fix nonetype error in plexupdate. #566
This commit is contained in:
parent
fc3ee3fa79
commit
6000a879ea
2 changed files with 7 additions and 5 deletions
|
@ -100,7 +100,7 @@ NOFLATTEN = []
|
||||||
DELETE_ORIGINAL = None
|
DELETE_ORIGINAL = None
|
||||||
TORRENT_DEFAULTDIR = None
|
TORRENT_DEFAULTDIR = None
|
||||||
|
|
||||||
REMOTEPATHS = None
|
REMOTEPATHS = []
|
||||||
|
|
||||||
UTORRENTWEBUI = None
|
UTORRENTWEBUI = None
|
||||||
UTORRENTUSR = None
|
UTORRENTUSR = None
|
||||||
|
@ -120,7 +120,7 @@ PLEXSSL = None
|
||||||
PLEXHOST = None
|
PLEXHOST = None
|
||||||
PLEXPORT = None
|
PLEXPORT = None
|
||||||
PLEXTOKEN = None
|
PLEXTOKEN = None
|
||||||
PLEXSEC = None
|
PLEXSEC = []
|
||||||
|
|
||||||
EXTCONTAINER = []
|
EXTCONTAINER = []
|
||||||
COMPRESSEDCONTAINER = []
|
COMPRESSEDCONTAINER = []
|
||||||
|
@ -353,7 +353,7 @@ def initialize(section=None):
|
||||||
DELUGEUSR = CFG["Torrent"]["DelugeUSR"] # mysecretusr
|
DELUGEUSR = CFG["Torrent"]["DelugeUSR"] # mysecretusr
|
||||||
DELUGEPWD = CFG["Torrent"]["DelugePWD"] # mysecretpwr
|
DELUGEPWD = CFG["Torrent"]["DelugePWD"] # mysecretpwr
|
||||||
|
|
||||||
REMOTEPATHS = CFG["Network"]["mount_points"] or None
|
REMOTEPATHS = CFG["Network"]["mount_points"] or []
|
||||||
if REMOTEPATHS:
|
if REMOTEPATHS:
|
||||||
if isinstance(REMOTEPATHS, list): REMOTEPATHS = ','.join(REMOTEPATHS) # fix in case this imported as list.
|
if isinstance(REMOTEPATHS, list): REMOTEPATHS = ','.join(REMOTEPATHS) # fix in case this imported as list.
|
||||||
REMOTEPATHS = [ tuple(item.split(',')) for item in REMOTEPATHS.split('|') ] # /volume1/Public/,E:\|/volume2/share/,\\NAS\
|
REMOTEPATHS = [ tuple(item.split(',')) for item in REMOTEPATHS.split('|') ] # /volume1/Public/,E:\|/volume2/share/,\\NAS\
|
||||||
|
@ -362,7 +362,7 @@ def initialize(section=None):
|
||||||
PLEXHOST = CFG["Plex"]["plex_host"]
|
PLEXHOST = CFG["Plex"]["plex_host"]
|
||||||
PLEXPORT = CFG["Plex"]["plex_port"]
|
PLEXPORT = CFG["Plex"]["plex_port"]
|
||||||
PLEXTOKEN = CFG["Plex"]["plex_token"]
|
PLEXTOKEN = CFG["Plex"]["plex_token"]
|
||||||
PLEXSEC = CFG["Plex"]["plex_sections"] or None
|
PLEXSEC = CFG["Plex"]["plex_sections"] or []
|
||||||
if PLEXSEC:
|
if PLEXSEC:
|
||||||
if isinstance(PLEXSEC, list): PLEXSEC = ','.join(PLEXSEC) # fix in case this imported as list.
|
if isinstance(PLEXSEC, list): PLEXSEC = ','.join(PLEXSEC) # fix in case this imported as list.
|
||||||
PLEXSEC = [ tuple(item.split(',')) for item in PLEXSEC.split('|') ]
|
PLEXSEC = [ tuple(item.split(',')) for item in PLEXSEC.split('|') ]
|
||||||
|
|
|
@ -1056,13 +1056,15 @@ def server_responding(baseURL):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def plex_update(category):
|
def plex_update(category):
|
||||||
logger.debug("Attempting to update Plex Library for category %s." %(category), 'PLEX')
|
|
||||||
if core.PLEXSSL:
|
if core.PLEXSSL:
|
||||||
ulr = 'https://'
|
ulr = 'https://'
|
||||||
else:
|
else:
|
||||||
url = 'http://'
|
url = 'http://'
|
||||||
url = url + core.PLEXHOST + ':' + core.PLEXPORT + '/library/sections/'
|
url = url + core.PLEXHOST + ':' + core.PLEXPORT + '/library/sections/'
|
||||||
section = None
|
section = None
|
||||||
|
if not core.PLEXSEC:
|
||||||
|
return
|
||||||
|
logger.debug("Attempting to update Plex Library for category %s." %(category), 'PLEX')
|
||||||
for item in core.PLEXSEC:
|
for item in core.PLEXSEC:
|
||||||
if item[0] == category:
|
if item[0] == category:
|
||||||
section = item[1]
|
section = item[1]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue