Add a warning output about minimum_threadmarks for XF.

This commit is contained in:
Jim Miller 2024-04-05 10:54:29 -05:00
parent 9120504249
commit 80f50b298f

View file

@ -521,7 +521,10 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
threadmarks = self.extract_threadmarks(souptag)
souptag = self.get_first_post(topsoup)
if len(threadmarks) >= int(self.getConfig('minimum_threadmarks',2)):
if len(threadmarks) < int(self.getConfig('minimum_threadmarks',2)):
logger.info("!! Not using threadmark metadata: threadmarks(%s) < minimum_threadmarks(%s)"%(len(threadmarks), int(self.getConfig('minimum_threadmarks',2))))
logger.info("!! Affects threadmark description, cover image, tags, etc.")
else:
# remember if reader link found--only applicable if using threadmarks.
self.reader = topsoup.find('a',href=re.compile(r'\.'+self.story.getMetadata('storyId')+r"(/\d+)?/reader/?$")) is not None