mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[43] updated radarr monitored and sonarr v4 adds
This commit is contained in:
parent
0216fa5bdd
commit
348852952b
5 changed files with 25 additions and 25 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.18.0-develop42
|
||||
1.18.0-develop43
|
||||
|
|
|
@ -179,7 +179,7 @@ class ConfigFile:
|
|||
self.data["libraries"][library]["settings"]["save_report"] = self.data["libraries"][library]["settings"].pop("save_missing")
|
||||
if "radarr" in self.data["libraries"][library] and self.data["libraries"][library]["radarr"]:
|
||||
if "monitor" in self.data["libraries"][library]["radarr"] and isinstance(self.data["libraries"][library]["radarr"]["monitor"], bool):
|
||||
self.data["libraries"][library]["radarr"]["monitor"] = "movie" if self.data["libraries"][library]["radarr"]["monitor"] else "none"
|
||||
self.data["libraries"][library]["radarr"]["monitor"] = True if self.data["libraries"][library]["radarr"]["monitor"] else False
|
||||
if "add" in self.data["libraries"][library]["radarr"]:
|
||||
self.data["libraries"][library]["radarr"]["add_missing"] = self.data["libraries"][library]["radarr"].pop("add")
|
||||
if "sonarr" in self.data["libraries"][library] and self.data["libraries"][library]["sonarr"]:
|
||||
|
@ -235,7 +235,7 @@ class ConfigFile:
|
|||
if "anidb" in self.data: self.data["anidb"] = self.data.pop("anidb")
|
||||
if "radarr" in self.data:
|
||||
if "monitor" in self.data["radarr"] and isinstance(self.data["radarr"]["monitor"], bool):
|
||||
self.data["radarr"]["monitor"] = "movie" if self.data["radarr"]["monitor"] else "none"
|
||||
self.data["radarr"]["monitor"] = True if self.data["radarr"]["monitor"] else False
|
||||
temp = self.data.pop("radarr")
|
||||
if temp and "add" in temp:
|
||||
temp["add_missing"] = temp.pop("add")
|
||||
|
@ -616,7 +616,7 @@ class ConfigFile:
|
|||
"add_existing": check_for_attribute(self.data, "add_existing", parent="radarr", var_type="bool", default=False),
|
||||
"upgrade_existing": check_for_attribute(self.data, "upgrade_existing", parent="radarr", var_type="bool", default=False),
|
||||
"root_folder_path": check_for_attribute(self.data, "root_folder_path", parent="radarr", default_is_none=True),
|
||||
"monitor": check_for_attribute(self.data, "monitor", parent="radarr", test_list=radarr.monitor_descriptions, default="movie"),
|
||||
"monitor": check_for_attribute(self.data, "monitor", parent="radarr", var_type="bool", default=True),
|
||||
"availability": check_for_attribute(self.data, "availability", parent="radarr", test_list=radarr.availability_descriptions, default="announced"),
|
||||
"quality_profile": check_for_attribute(self.data, "quality_profile", parent="radarr", default_is_none=True),
|
||||
"tag": check_for_attribute(self.data, "tag", parent="radarr", var_type="lower_list", default_is_none=True),
|
||||
|
@ -884,7 +884,7 @@ class ConfigFile:
|
|||
"add_existing": check_for_attribute(lib, "add_existing", parent="radarr", var_type="bool", default=self.general["radarr"]["add_existing"], save=False),
|
||||
"upgrade_existing": check_for_attribute(lib, "upgrade_existing", parent="radarr", var_type="bool", default=self.general["radarr"]["upgrade_existing"], save=False),
|
||||
"root_folder_path": check_for_attribute(lib, "root_folder_path", parent="radarr", default=self.general["radarr"]["root_folder_path"], req_default=True, save=False),
|
||||
"monitor": check_for_attribute(lib, "monitor", parent="radarr", test_list=radarr.monitor_descriptions, default=self.general["radarr"]["monitor"], save=False),
|
||||
"monitor": check_for_attribute(lib, "monitor", parent="radarr", var_type="bool", default=self.general["radarr"]["monitor"], save=False),
|
||||
"availability": check_for_attribute(lib, "availability", parent="radarr", test_list=radarr.availability_descriptions, default=self.general["radarr"]["availability"], save=False),
|
||||
"quality_profile": check_for_attribute(lib, "quality_profile", parent="radarr", default=self.general["radarr"]["quality_profile"], req_default=True, save=False),
|
||||
"tag": check_for_attribute(lib, "tag", parent="radarr", var_type="lower_list", default=self.general["radarr"]["tag"], default_is_none=True, save=False),
|
||||
|
|
|
@ -145,27 +145,30 @@ class MyLogger:
|
|||
for handler in self._logger.handlers:
|
||||
self._formatter(handler, border=False)
|
||||
border_text = f"|{self.separating_character * self.screen_width}|"
|
||||
if border and debug:
|
||||
self.debug(border_text)
|
||||
elif border:
|
||||
self.info(border_text)
|
||||
if border:
|
||||
self.print(border_text, debug=debug)
|
||||
if text:
|
||||
text_list = text.split("\n")
|
||||
for t in text_list:
|
||||
msg = f"|{sep}{self._centered(t, sep=sep, side_space=side_space, left=left)}{sep}|"
|
||||
if trace:
|
||||
self.trace(msg)
|
||||
elif debug:
|
||||
self.debug(msg)
|
||||
else:
|
||||
self.info(msg)
|
||||
if border and debug:
|
||||
self.debug(border_text)
|
||||
elif border:
|
||||
self.info(border_text)
|
||||
self.print(msg, debug=debug, trace=trace)
|
||||
if border:
|
||||
self.print(border_text, debug=debug)
|
||||
for handler in self._logger.handlers:
|
||||
self._formatter(handler)
|
||||
|
||||
def print(self, msg, error=False, warning=False, debug=False, trace=False):
|
||||
if error:
|
||||
self.error(msg)
|
||||
elif warning:
|
||||
self.warning(msg)
|
||||
elif debug:
|
||||
self.debug(msg)
|
||||
elif trace:
|
||||
self.trace(msg)
|
||||
else:
|
||||
self.info(msg)
|
||||
|
||||
def debug(self, msg, *args, **kwargs):
|
||||
if self._logger.isEnabledFor(DEBUG):
|
||||
self._log(DEBUG, str(msg), args, **kwargs)
|
||||
|
@ -198,10 +201,7 @@ class MyLogger:
|
|||
self._log(CRITICAL, str(msg), args, **kwargs)
|
||||
|
||||
def stacktrace(self, trace=False):
|
||||
if trace:
|
||||
self.trace(traceback.format_exc())
|
||||
else:
|
||||
self.debug(traceback.format_exc())
|
||||
self.print(traceback.format_exc(), debug=not trace, trace=trace)
|
||||
|
||||
def _space(self, display_title):
|
||||
display_title = str(display_title)
|
||||
|
|
|
@ -55,7 +55,7 @@ class Radarr:
|
|||
logger.debug(tmdb_id)
|
||||
upgrade_existing = options["upgrade_existing"] if "upgrade_existing" in options else self.upgrade_existing
|
||||
folder = options["folder"] if "folder" in options else self.root_folder_path
|
||||
monitor = monitor_translation[options["monitor"] if "monitor" in options else self.monitor]
|
||||
monitor = options["monitor"] if "monitor" in options else self.monitor
|
||||
if not self.api._raw.v4:
|
||||
monitor = monitor != "none"
|
||||
availability = availability_translation[options["availability"] if "availability" in options else self.availability]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
PlexAPI==4.13.1
|
||||
tmdbapis==1.0.8
|
||||
arrapi==1.4.0
|
||||
arrapi==1.4.1
|
||||
lxml==4.9.1
|
||||
requests==2.28.1
|
||||
requests-cache==0.9.6
|
||||
|
|
Loading…
Reference in a new issue