From 7c6fb6bf37efe4d50b05319445dcfcc87fe9e70c Mon Sep 17 00:00:00 2001 From: Devin Gaffney Date: Mon, 18 Dec 2023 08:05:41 -0800 Subject: [PATCH] add video updates --- README.md | 4 ++-- lib/model/video.py | 2 +- lib/schemas.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0499564..77f4c36 100644 --- a/README.md +++ b/README.md @@ -122,8 +122,8 @@ Output Message: "id": "A unique string ID that identifies the item being processed", "callback_url": "A unique URL that will be requested upon completion", "url": "The URL at which the media is located", - "bucket": "bucket within which the .tmk file is stored", - "outfile": "The filename of the .tmk file generated for the video", + "folder": "bucket within which the .tmk file is stored", + "filepath": "The filename of the .tmk file generated for the video", "hash_value": "The shorter, getPureAverageFeature hash from tmk (used in first-pass approximation searches)", } ``` diff --git a/lib/model/video.py b/lib/model/video.py index 569d8b8..d637bee 100644 --- a/lib/model/video.py +++ b/lib/model/video.py @@ -58,4 +58,4 @@ def process(self, video: schemas.Message) -> schemas.GenericItem: s3.upload_file_to_s3(self.tmk_bucket(), self.tmk_file_path(video_filename)) finally: os.remove(temp_file_name) - return dict(**video.dict(), **{"bucket": self.tmk_bucket(), "outfile": self.tmk_file_path(video_filename), "hash_value": hash_value}) + return dict(**video.dict(), **{"folder": self.tmk_bucket(), "filepath": self.tmk_file_path(video_filename), "hash_value": hash_value}) diff --git a/lib/schemas.py b/lib/schemas.py index 6679c20..0969b5c 100644 --- a/lib/schemas.py +++ b/lib/schemas.py @@ -13,8 +13,8 @@ class MediaItem(GenericItem): hash_value: Optional[Any] = None class VideoItem(MediaItem): - bucket: Optional[str] = None - outfile: Optional[str] = None + folder: Optional[str] = None + filepath: Optional[str] = None class Message(BaseModel): body: Union[MediaItem, VideoItem]