mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Rename "no_videos" to videos
This commit is contained in:
parent
b44b49476d
commit
e1d18708b3
@ -55,10 +55,10 @@ class KitIliasWebCrawlerSection(CrawlerSection):
|
|||||||
return self.s.getint("link_file_redirect_delay", fallback=-1)
|
return self.s.getint("link_file_redirect_delay", fallback=-1)
|
||||||
|
|
||||||
def link_file_use_plaintext(self) -> bool:
|
def link_file_use_plaintext(self) -> bool:
|
||||||
return self.s.getboolean("link_file_plain_text", fallback=False)
|
return self.s.getboolean("link_file_plaintext", fallback=False)
|
||||||
|
|
||||||
def no_videos(self) -> bool:
|
def videos(self) -> bool:
|
||||||
return self.s.getboolean("no-videos", fallback=True)
|
return self.s.getboolean("videos", fallback=False)
|
||||||
|
|
||||||
|
|
||||||
_DIRECTORY_PAGES: Set[IliasElementType] = set([
|
_DIRECTORY_PAGES: Set[IliasElementType] = set([
|
||||||
@ -163,7 +163,7 @@ class KitIliasWebCrawler(HttpCrawler):
|
|||||||
self._target = section.target()
|
self._target = section.target()
|
||||||
self._link_file_redirect_delay = section.link_file_redirect_delay()
|
self._link_file_redirect_delay = section.link_file_redirect_delay()
|
||||||
self._link_file_use_plaintext = section.link_file_use_plaintext()
|
self._link_file_use_plaintext = section.link_file_use_plaintext()
|
||||||
self._no_videos = section.no_videos()
|
self._videos = section.videos()
|
||||||
|
|
||||||
async def _run(self) -> None:
|
async def _run(self) -> None:
|
||||||
if isinstance(self._target, int):
|
if isinstance(self._target, int):
|
||||||
@ -253,7 +253,7 @@ class KitIliasWebCrawler(HttpCrawler):
|
|||||||
|
|
||||||
if element.type in _VIDEO_ELEMENTS:
|
if element.type in _VIDEO_ELEMENTS:
|
||||||
log.explain_topic(f"Decision: Crawl video element {fmt_path(element_path)}")
|
log.explain_topic(f"Decision: Crawl video element {fmt_path(element_path)}")
|
||||||
if self._no_videos:
|
if not self._videos:
|
||||||
log.explain("Video crawling is disabled")
|
log.explain("Video crawling is disabled")
|
||||||
log.explain("Answer: no")
|
log.explain("Answer: no")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user