|
|
@ -502,22 +502,25 @@ class CollectionBuilder:
|
|
|
|
if "smart_filter" in methods and not self.playlist:
|
|
|
|
if "smart_filter" in methods and not self.playlist:
|
|
|
|
self.smart_type_key, self.smart_filter_details, self.smart_url = self.build_filter("smart_filter", self.data[methods["smart_filter"]], display=True, default_sort="random")
|
|
|
|
self.smart_type_key, self.smart_filter_details, self.smart_url = self.build_filter("smart_filter", self.data[methods["smart_filter"]], display=True, default_sort="random")
|
|
|
|
|
|
|
|
|
|
|
|
def cant_interact(attr1, attr2, fail=False):
|
|
|
|
if self.collectionless:
|
|
|
|
if getattr(self, attr1) and getattr(self, attr2):
|
|
|
|
for x in ["smart_label", "smart_filter", "smart_url"]:
|
|
|
|
message = f"{self.Type} Error: {attr1} & {attr2} attributes cannot go together"
|
|
|
|
if x in methods:
|
|
|
|
if fail:
|
|
|
|
self.collectionless = False
|
|
|
|
raise Failed(message)
|
|
|
|
logger.info("")
|
|
|
|
else:
|
|
|
|
logger.warning(f"{self.Type} Error: {x} is not compatible with plex_collectionless removing plex_collectionless")
|
|
|
|
setattr(self, attr2, False)
|
|
|
|
|
|
|
|
|
|
|
|
if self.run_again and self.smart_url:
|
|
|
|
|
|
|
|
self.run_again = False
|
|
|
|
logger.info("")
|
|
|
|
logger.info("")
|
|
|
|
logger.warning(f"{message} removing {attr2}")
|
|
|
|
logger.warning(f"{self.Type} Error: smart_filter is not compatible with run_again removing run_again")
|
|
|
|
|
|
|
|
|
|
|
|
cant_interact("smart_label_collection", "collectionless")
|
|
|
|
if self.smart_url and self.smart_label_collection:
|
|
|
|
cant_interact("smart_url", "collectionless")
|
|
|
|
raise Failed(f"{self.Type} Error: smart_filter is not compatible with smart_label")
|
|
|
|
cant_interact("smart_url", "run_again")
|
|
|
|
|
|
|
|
cant_interact("smart_label_collection", "smart_url", fail=True)
|
|
|
|
if self.parts_collection:
|
|
|
|
cant_interact("smart_label_collection", "parts_collection", fail=True)
|
|
|
|
for x in ["smart_label", "smart_filter", "smart_url"]:
|
|
|
|
cant_interact("smart_url", "parts_collection", fail=True)
|
|
|
|
if x in methods:
|
|
|
|
|
|
|
|
raise Failed(f"{self.Type} Error: {x} is not compatible with collection_level: {self.collection_level}")
|
|
|
|
|
|
|
|
|
|
|
|
self.smart = self.smart_url or self.smart_label_collection
|
|
|
|
self.smart = self.smart_url or self.smart_label_collection
|
|
|
|
|
|
|
|
|
|
|
|