mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 04:16:24 -05:00
Search suggestions handles any combination of filtering.
This commit is contained in:
parent
23d84ed107
commit
8916600a14
4 changed files with 89 additions and 49 deletions
|
|
@ -91,8 +91,9 @@ def video_factory(test_session, test_directory):
|
|||
|
||||
def factory(channel_id: int = None, title: str = None, upload_date=None, with_video_file=None,
|
||||
with_info_json: dict = None, with_poster_ext: str = None, with_caption_file: bool = False,
|
||||
source_id: str = None) -> Video:
|
||||
source_id: str = None, tag_names: List[str] = None) -> Video:
|
||||
title = title or str(uuid4())
|
||||
tag_names = tag_names or list()
|
||||
|
||||
if with_video_file and isinstance(with_video_file, (pathlib.Path, str)):
|
||||
# Put the video exactly where specified for the test.
|
||||
|
|
@ -134,6 +135,10 @@ def video_factory(test_session, test_directory):
|
|||
video.source_id = source_id or title
|
||||
video.file_group.published_datetime = upload_date
|
||||
video.validate()
|
||||
|
||||
for tag_name in tag_names:
|
||||
video.add_tag(tag_name)
|
||||
|
||||
return video
|
||||
|
||||
return factory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue