-
Notifications
You must be signed in to change notification settings - Fork 0
Add YouTube Shorts section with split layout and auto-play #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d876a40
c7524dd
a625d6c
bda2509
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,9 @@ def get_all_videos(self) -> List[VideoHighlight]: | |
| "date": 1, | ||
| "video_url": 1, | ||
| "thumbnail_url": 1, | ||
| "video_type": 1, | ||
| }, | ||
| ) | ||
| ).sort("date", -1) | ||
|
||
| ) | ||
| results: List[VideoHighlight] = [] | ||
| for d in docs: | ||
|
|
@@ -34,6 +35,7 @@ def get_all_videos(self) -> List[VideoHighlight]: | |
| date=d.get("date"), | ||
| video_url=d.get("video_url"), | ||
| thumbnail_url=d.get("thumbnail_url"), | ||
| video_type=d.get("video_type", "regular"), | ||
| ) | ||
| results.append(vid) | ||
| return results | ||
|
|
@@ -52,6 +54,7 @@ def get_video_by_id(self, video_id: str) -> Optional[VideoHighlight]: | |
| "date": 1, | ||
| "video_url": 1, | ||
| "thumbnail_url": 1, | ||
| "video_type": 1, | ||
| }, | ||
| ) | ||
| if not doc: | ||
|
|
@@ -63,6 +66,7 @@ def get_video_by_id(self, video_id: str) -> Optional[VideoHighlight]: | |
| date=doc.get("date"), | ||
| video_url=doc.get("video_url"), | ||
| thumbnail_url=doc.get("thumbnail_url"), | ||
| video_type=doc.get("video_type", "regular"), | ||
| ) | ||
|
|
||
| doc = self.videos_collection.find_one( | ||
|
|
@@ -74,6 +78,7 @@ def get_video_by_id(self, video_id: str) -> Optional[VideoHighlight]: | |
| "date": 1, | ||
| "video_url": 1, | ||
| "thumbnail_url": 1, | ||
| "video_type": 1, | ||
| }, | ||
| ) | ||
| if not doc: | ||
|
|
@@ -85,6 +90,7 @@ def get_video_by_id(self, video_id: str) -> Optional[VideoHighlight]: | |
| date=doc.get("date"), | ||
| video_url=doc.get("video_url"), | ||
| thumbnail_url=doc.get("thumbnail_url"), | ||
| video_type=doc.get("video_type", "regular"), | ||
| ) | ||
|
|
||
| def create_video(self, video: VideoHighlight) -> VideoHighlight: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation in
agents/directory has not been updated to reflect the newvideo_typefield in the VideoHighlight model. The documentation shows the old schema without thevideoTypefield. Consider updating the documentation files (AGENTS.md, CLAUDE.md, GEMINI.md) to include the new optionalvideoType?: "regular" | "short"field in the VideoHighlight interface.