pull/487/head
meisnate12 3 years ago
parent dc32dc708f
commit 8602b7971a

@ -1 +1 @@
1.13.1 1.13.1-develop127

@ -30,14 +30,13 @@ settings: # Can be individually specified
only_filter_missing: false only_filter_missing: false
collection_minimum: 1 collection_minimum: 1
delete_below_minimum: true delete_below_minimum: true
delete_not_scheduled: false
tvdb_language: eng tvdb_language: eng
webhooks: # Can be individually specified per library as well webhooks: # Can be individually specified per library as well
error: error:
run_start: run_start:
run_end: run_end:
collection_creation: collection_changes:
collection_addition:
collection_removal:
plex: # Can be individually specified per library as well; REQUIRED for the script to run plex: # Can be individually specified per library as well; REQUIRED for the script to run
url: http://192.168.1.12:32400 url: http://192.168.1.12:32400
token: #################### token: ####################

@ -84,7 +84,7 @@ boolean_details = [
] ]
string_details = ["sort_title", "content_rating", "name_mapping"] string_details = ["sort_title", "content_rating", "name_mapping"]
ignored_details = [ ignored_details = [
"smart_filter", "smart_label", "smart_url", "run_again", "schedule", "sync_mode", "template", "test", "smart_filter", "smart_label", "smart_url", "run_again", "schedule", "sync_mode", "template", "test", "delete_not_scheduled",
"tmdb_person", "build_collection", "collection_order", "collection_level", "validate_builders", "collection_name" "tmdb_person", "build_collection", "collection_order", "collection_level", "validate_builders", "collection_name"
] ]
details = ["collection_changes_webhooks", "collection_mode", "collection_order", "collection_level", "collection_minimum", "label"] + boolean_details + string_details details = ["collection_changes_webhooks", "collection_mode", "collection_order", "collection_level", "collection_minimum", "label"] + boolean_details + string_details
@ -395,15 +395,18 @@ class CollectionBuilder:
except ValueError: except ValueError:
logger.error(f"Collection Error: monthly schedule attribute {schedule} invalid must be an integer between 1 and 31") logger.error(f"Collection Error: monthly schedule attribute {schedule} invalid must be an integer between 1 and 31")
elif run_time.startswith("year"): elif run_time.startswith("year"):
match = re.match("^(1[0-2]|0?[1-9])/(3[01]|[12][0-9]|0?[1-9])$", param) try:
if not match: if "/" in param:
logger.error(f"Collection Error: yearly schedule attribute {schedule} invalid must be in the MM/DD format i.e. yearly(11/22)") opt = param.split("/")
continue month = int(opt[0])
month = int(match.group(1)) day = int(opt[1])
day = int(match.group(2))
self.schedule += f"\nScheduled yearly on {util.pretty_months[month]} {util.make_ordinal(day)}" self.schedule += f"\nScheduled yearly on {util.pretty_months[month]} {util.make_ordinal(day)}"
if self.current_time.month == month and (self.current_time.day == day or (self.current_time.day == last_day.day and day > last_day.day)): if self.current_time.month == month and (self.current_time.day == day or (self.current_time.day == last_day.day and day > last_day.day)):
skip_collection = False skip_collection = False
else:
raise ValueError
except ValueError:
logger.error(f"Collection Error: yearly schedule attribute {schedule} invalid must be in the MM/DD format i.e. yearly(11/22)")
elif run_time.startswith("range"): elif run_time.startswith("range"):
match = re.match("^(1[0-2]|0?[1-9])/(3[01]|[12][0-9]|0?[1-9])-(1[0-2]|0?[1-9])/(3[01]|[12][0-9]|0?[1-9])$", param) match = re.match("^(1[0-2]|0?[1-9])/(3[01]|[12][0-9]|0?[1-9])-(1[0-2]|0?[1-9])/(3[01]|[12][0-9]|0?[1-9])$", param)
if not match: if not match:

Loading…
Cancel
Save