dont verify Session

pull/590/head
meisnate12 3 years ago
parent f1f3ad813a
commit 3dbfe54ca6

@ -1 +1 @@
1.14.1-develop1522 1.14.1-develop1722

@ -339,29 +339,6 @@ class CollectionBuilder:
else: else:
self.sync = self.data[methods["sync_mode"]].lower() == "sync" self.sync = self.data[methods["sync_mode"]].lower() == "sync"
test_sort = None
if "collection_order" in methods and not self.playlist:
if self.data[methods["collection_order"]] is None:
raise Failed(f"{self.Type} Warning: collection_order attribute is blank")
else:
test_sort = self.data[methods["collection_order"]]
elif "collection_order" not in methods and not self.playlist and self.library.default_collection_order:
test_sort = self.library.default_collection_order
logger.warning(f"{self.Type} Warning: collection_order not found using library default_collection_order: {self.library.default_collection_order}")
self.custom_sort = self.playlist
if test_sort:
logger.debug("")
logger.debug("Validating Method: collection_order")
logger.debug(f"Value: {test_sort}")
if test_sort.lower() in plex.collection_order_options:
self.details["collection_order"] = test_sort.lower()
if test_sort.lower() == "custom" and self.build_collection:
self.custom_sort = True
elif (self.library.is_movie and test_sort.lower() in plex.movie_sorts) or (self.library.is_show and test_sort.lower() in plex.show_sorts):
self.custom_sort = test_sort.lower()
else:
raise Failed(f"{self.Type} Error: {test_sort} collection_order invalid\n\trelease (Order Collection by release dates)\n\talpha (Order Collection Alphabetically)\n\tcustom (Custom Order Collection)\n\tOther sorting options can be found at https://github.com/meisnate12/Plex-Meta-Manager/wiki/Smart-Builders#sort-options")
self.collection_level = "movie" if self.library.is_movie else "show" self.collection_level = "movie" if self.library.is_movie else "show"
if self.playlist: if self.playlist:
self.collection_level = "item" self.collection_level = "item"
@ -459,24 +436,30 @@ class CollectionBuilder:
self.smart = self.smart_url or self.smart_label_collection self.smart = self.smart_url or self.smart_label_collection
self.custom_sort = self.playlist test_sort = None
if "collection_order" in methods and not self.playlist: if "collection_order" in methods and not self.playlist:
if self.data[methods["collection_order"]] is None:
raise Failed(f"{self.Type} Warning: collection_order attribute is blank")
else:
test_sort = self.data[methods["collection_order"]]
elif "collection_order" not in methods and not self.playlist and self.library.default_collection_order:
test_sort = self.library.default_collection_order
logger.warning(f"{self.Type} Warning: collection_order not found using library default_collection_order: {self.library.default_collection_order}")
self.custom_sort = self.playlist
if test_sort:
if self.smart: if self.smart:
raise Failed(f"{self.Type} Error: collection_order does not work with Smart Collections") raise Failed(f"{self.Type} Error: collection_order does not work with Smart Collections")
logger.debug("") logger.debug("")
logger.debug("Validating Method: collection_order") logger.debug("Validating Method: collection_order")
if self.data[methods["collection_order"]] is None: logger.debug(f"Value: {test_sort}")
raise Failed(f"{self.Type} Error: collection_order attribute is blank") if test_sort.lower() in plex.collection_order_options:
else: self.details["collection_order"] = test_sort.lower()
logger.debug(f"Value: {self.data[methods['collection_order']]}") if test_sort.lower() == "custom" and self.build_collection:
if self.data[methods["collection_order"]].lower() in plex.collection_order_options:
self.details["collection_order"] = self.data[methods["collection_order"]].lower()
if self.data[methods["collection_order"]].lower() == "custom" and self.build_collection:
self.custom_sort = True self.custom_sort = True
elif (self.library.is_movie and self.data[methods["collection_order"]].lower() in plex.movie_sorts) or (self.library.is_show and self.data[methods["collection_order"]].lower() in plex.show_sorts): elif (self.library.is_movie and test_sort.lower() in plex.movie_sorts) or (self.library.is_show and test_sort.lower() in plex.show_sorts):
self.custom_sort = self.data[methods["collection_order"]].lower() self.custom_sort = test_sort.lower()
else: else:
raise Failed(f"{self.Type} Error: {self.data[methods['collection_order']]} collection_order invalid\n\trelease (Order Collection by release dates)\n\talpha (Order Collection Alphabetically)\n\tcustom (Custom Order Collection)\n\tOther sorting options can be found at https://github.com/meisnate12/Plex-Meta-Manager/wiki/Smart-Builders#sort-options") raise Failed(f"{self.Type} Error: {test_sort} collection_order invalid\n\trelease (Order Collection by release dates)\n\talpha (Order Collection Alphabetically)\n\tcustom (Custom Order Collection)\n\tOther sorting options can be found at https://github.com/meisnate12/Plex-Meta-Manager/wiki/Smart-Builders#sort-options")
if self.smart_url or self.smart_label_collection or self.parts_collection: if self.smart_url or self.smart_label_collection or self.parts_collection:
self.custom_sort = False self.custom_sort = False

@ -256,6 +256,10 @@ class ConfigFile:
return default return default
self.session = requests.Session() self.session = requests.Session()
self.session.verify = False
if self.session.verify is False:
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
self.general = { self.general = {
"cache": check_for_attribute(self.data, "cache", parent="settings", var_type="bool", default=True), "cache": check_for_attribute(self.data, "cache", parent="settings", var_type="bool", default=True),
@ -585,7 +589,7 @@ class ConfigFile:
params["split_duplicates"] = check_for_attribute(lib, "split_duplicates", var_type="bool", default=False, save=False, do_print=False) params["split_duplicates"] = check_for_attribute(lib, "split_duplicates", var_type="bool", default=False, save=False, do_print=False)
params["radarr_add_all_existing"] = check_for_attribute(lib, "radarr_add_all_existing", var_type="bool", default=False, save=False, do_print=False) params["radarr_add_all_existing"] = check_for_attribute(lib, "radarr_add_all_existing", var_type="bool", default=False, save=False, do_print=False)
params["sonarr_add_all_existing"] = check_for_attribute(lib, "sonarr_add_all_existing", var_type="bool", default=False, save=False, do_print=False) params["sonarr_add_all_existing"] = check_for_attribute(lib, "sonarr_add_all_existing", var_type="bool", default=False, save=False, do_print=False)
params["missing_path"] = check_for_attribute(lib, "missing_path", var_type="path", default_is_none=True, save=False, do_print=True) params["missing_path"] = check_for_attribute(lib, "missing_path", var_type="path", default_is_none=True, save=False)
if lib and "operations" in lib and lib["operations"]: if lib and "operations" in lib and lib["operations"]:
if isinstance(lib["operations"], dict): if isinstance(lib["operations"], dict):

Loading…
Cancel
Save