Prevent duplicate regex_patterns
This commit is contained in:
parent
06a7c06933
commit
84e5f806c9
2747 changed files with 6157 additions and 10149 deletions
|
|
@ -46,6 +46,19 @@ def main():
|
|||
os.makedirs(profiles_dir, exist_ok=True)
|
||||
clear_output_dir(profiles_dir)
|
||||
|
||||
for service in ["radarr", "sonarr"]:
|
||||
trash_custom_formats_dir = os.path.join(input_dir, f"{service}/cf")
|
||||
if not os.path.exists(trash_custom_formats_dir):
|
||||
print(
|
||||
f"Custom format directory {trash_custom_formats_dir} does not exist, skipping."
|
||||
)
|
||||
continue
|
||||
custom_regex_patterns = collect_regex_patterns(
|
||||
service,
|
||||
trash_custom_formats_dir,
|
||||
regex_patterns_dir,
|
||||
)
|
||||
|
||||
for service in ["radarr", "sonarr"]:
|
||||
trash_custom_formats_dir = os.path.join(input_dir, f"{service}/cf")
|
||||
if not os.path.exists(trash_custom_formats_dir):
|
||||
|
|
@ -60,16 +73,8 @@ def main():
|
|||
f"Custom format directory {trash_profiles_dir} does not exist, skipping."
|
||||
)
|
||||
continue
|
||||
|
||||
collect_regex_patterns(
|
||||
service,
|
||||
trash_custom_formats_dir,
|
||||
regex_patterns_dir,
|
||||
)
|
||||
trash_id_to_scoring_mapping = collect_custom_formats(
|
||||
service,
|
||||
trash_custom_formats_dir,
|
||||
custom_formats_dir,
|
||||
service, trash_custom_formats_dir, custom_formats_dir, custom_regex_patterns
|
||||
)
|
||||
collect_profiles(
|
||||
service,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue