🧵 Add multithreading when getting image assets

This commit is contained in:
2024-05-17 11:18:28 +02:00
parent 08f3e09b4b
commit e58e41a911
7 changed files with 49 additions and 39 deletions

View File

@@ -11,7 +11,7 @@ class BaseStockImageEngine(BaseEngine):
"""
@abstractmethod
def get(self, query: str, start: float, end: float) -> mp.ImageClip:
def get(self, query: str, start: float, end: float, i = "") -> mp.ImageClip:
"""
Get a stock image based on a query.
@@ -19,6 +19,7 @@ class BaseStockImageEngine(BaseEngine):
query (str): The query to search for.
start (float): The starting time of the video clip.
end (float): The ending time of the video clip.
i (str): Unique identifier for the image, mandatory if running concurrently.
Returns:
str: The path to the saved image.