also check by tag name

This commit is contained in:
dgtlmoon
2023-05-22 15:40:34 +02:00
parent 46ab2846d0
commit 5e5fe6dc05
+10 -2
View File
@@ -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