mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
add_existing fix
This commit is contained in:
parent
b415c3a830
commit
102ee808f6
4 changed files with 14 additions and 2 deletions
|
@ -609,6 +609,9 @@ class CollectionBuilder:
|
||||||
self.sonarr_details["add"] = False
|
self.sonarr_details["add"] = False
|
||||||
self.sonarr_details["add_existing"] = False
|
self.sonarr_details["add_existing"] = False
|
||||||
|
|
||||||
|
if self.radarr_details["add_existing"] or self.sonarr_details["add_existing"]:
|
||||||
|
self.item_details["add_existing"] = True
|
||||||
|
|
||||||
if self.collectionless:
|
if self.collectionless:
|
||||||
self.details["collection_mode"] = "hide"
|
self.details["collection_mode"] = "hide"
|
||||||
self.sync = True
|
self.sync = True
|
||||||
|
|
|
@ -495,6 +495,7 @@ class Config:
|
||||||
self.errors.append(e)
|
self.errors.append(e)
|
||||||
util.print_stacktrace()
|
util.print_stacktrace()
|
||||||
util.print_multiline(e, error=True)
|
util.print_multiline(e, error=True)
|
||||||
|
logger.info("")
|
||||||
logger.info(f"{display_name} Library Connection Failed")
|
logger.info(f"{display_name} Library Connection Failed")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@ class Library(ABC):
|
||||||
logger.info(f"Using Asset Directory: {ad}")
|
logger.info(f"Using Asset Directory: {ad}")
|
||||||
|
|
||||||
if output:
|
if output:
|
||||||
|
logger.info("")
|
||||||
logger.info(output)
|
logger.info(output)
|
||||||
|
|
||||||
def upload_images(self, item, poster=None, background=None, overlay=None):
|
def upload_images(self, item, poster=None, background=None, overlay=None):
|
||||||
|
|
|
@ -230,6 +230,7 @@ class Plex(Library):
|
||||||
self.url = params["plex"]["url"]
|
self.url = params["plex"]["url"]
|
||||||
self.token = params["plex"]["token"]
|
self.token = params["plex"]["token"]
|
||||||
self.timeout = params["plex"]["timeout"]
|
self.timeout = params["plex"]["timeout"]
|
||||||
|
logger.info("")
|
||||||
try:
|
try:
|
||||||
self.PlexServer = PlexServer(baseurl=self.url, token=self.token, session=self.config.session, timeout=self.timeout)
|
self.PlexServer = PlexServer(baseurl=self.url, token=self.token, session=self.config.session, timeout=self.timeout)
|
||||||
except Unauthorized:
|
except Unauthorized:
|
||||||
|
@ -239,9 +240,15 @@ class Plex(Library):
|
||||||
except (requests.exceptions.ConnectionError, ParseError):
|
except (requests.exceptions.ConnectionError, ParseError):
|
||||||
util.print_stacktrace()
|
util.print_stacktrace()
|
||||||
raise Failed("Plex Error: Plex url is invalid")
|
raise Failed("Plex Error: Plex url is invalid")
|
||||||
self.Plex = next((s for s in self.PlexServer.library.sections() if s.title == params["name"]), None)
|
self.Plex = None
|
||||||
|
library_names = []
|
||||||
|
for s in self.PlexServer.library.sections():
|
||||||
|
library_names.append(s.title)
|
||||||
|
if s.title == params["name"]:
|
||||||
|
self.Plex = s
|
||||||
|
break
|
||||||
if not self.Plex:
|
if not self.Plex:
|
||||||
raise Failed(f"Plex Error: Plex Library {params['name']} not found")
|
raise Failed(f"Plex Error: Plex Library {params['name']} not found. Options: {library_names}")
|
||||||
if self.Plex.type in ["movie", "show"]:
|
if self.Plex.type in ["movie", "show"]:
|
||||||
self.type = self.Plex.type.capitalize()
|
self.type = self.Plex.type.capitalize()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue