From 2d6f485a5db8d97e7d861cab98e38a5cb2895dc4 Mon Sep 17 00:00:00 2001 From: locke4 <65832338+locke4@users.noreply.github.com> Date: Tue, 28 Nov 2023 08:48:31 +0000 Subject: [PATCH] Update signals.py --- tubesync/sync/signals.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tubesync/sync/signals.py b/tubesync/sync/signals.py index d1f3d03..c15f15e 100644 --- a/tubesync/sync/signals.py +++ b/tubesync/sync/signals.py @@ -114,7 +114,7 @@ def media_post_save(sender, instance, created, **kwargs): f'set but is already marked to be skipped') else: if max_cap_age and filter_text: - if (published > max_cap_age) and (source.is_regex_match(instance.title)): + if (published > max_cap_age) and (instance.source.is_regex_match(instance.title)): # Media was published after the cap date and matches the filter text, but is set to be skipped print('Has a valid publishing date and matches filter, marking unskipped') instance.skip = False @@ -131,7 +131,7 @@ def media_post_save(sender, instance, created, **kwargs): instance.skip = False cap_changed = True elif filter_text: - if source.is_regex_match(instance.title): + if instance.source.is_regex_match(instance.title): # Media matches the filter text but is set to be skipped log.info(f'Media: {instance.source} / {instance} matches the filter text, marking to be unskipped') instance.skip = False @@ -149,7 +149,7 @@ def media_post_save(sender, instance, created, **kwargs): instance.skip = True cap_changed = True if filter_text: - if not re.search(filter_text,instance.title): + if not instance.source.is_regex_match(instance.title): #media doesn't match the filter text but is not marked to be skipped log.info(f'Media: {instance.source} / {instance} does not match the filter text') instance.skip = True