From 5e5fe6dc05a5fe07ddf338c8ed8b49eee3842c91 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 22 May 2023 15:40:34 +0200 Subject: [PATCH] also check by tag name --- changedetectionio/model/Watch.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/changedetectionio/model/Watch.py b/changedetectionio/model/Watch.py index 0518dd3d2..923ef6d11 100644 --- a/changedetectionio/model/Watch.py +++ b/changedetectionio/model/Watch.py @@ -474,8 +474,16 @@ class model(dict): return False def has_extra_headers_file(self): - filepath = os.path.join(self.watch_data_dir, 'headers.txt') - return os.path.isfile(filepath) + if os.path.isfile(os.path.join(self.watch_data_dir, 'headers.txt')): + return True + + for f in self.all_tags: + fname = re.sub(r'[\W_-]', '', f).lower().strip() + ".txt" + filepath = os.path.join(self.__datastore_path, fname) + if os.path.isfile(filepath): + return True + + return False def get_all_headers(self): from .App import parse_headers_from_text_file