Compare commits

...

5 Commits

Author SHA1 Message Date
github-actions[bot]
96225d4aea chore(release): Update version to v1.4.353 2025-12-19 16:21:50 +00:00
Kayvan Sylvan
adcdc0cf0b Merge pull request #1887 from bvandevliet/feat/yt-title-and-description
feat: correct video title and added description to yt transcript api response
2025-12-19 08:19:15 -08:00
Changelog Bot
e3f9b12fde chore: incoming 1887 changelog entry 2025-12-19 08:16:18 -08:00
Bob Vandevliet
7fa4c0a030 Updated API documentation. 2025-12-19 13:23:44 +01:00
Bob Vandevliet
8a3fa9337c feat: correct video title (instead of id) and added description to yt transcript api response 2025-12-19 13:14:12 +01:00
6 changed files with 24 additions and 5 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## v1.4.353 (2025-12-19)
### PR [#1887](https://github.com/danielmiessler/Fabric/pull/1887) by [bvandevliet](https://github.com/bvandevliet): feat: correct video title and added description to yt transcript api response
- Feat: correct video title (instead of id) and added description to yt transcript api response
- Updated API documentation.
## v1.4.352 (2025-12-18)
### PR [#1886](https://github.com/danielmiessler/Fabric/pull/1886) by [ksylvan](https://github.com/ksylvan): Enhanced Onboarding and Setup Experience

View File

@@ -1,3 +1,3 @@
package main
var version = "v1.4.352"
var version = "v1.4.353"

Binary file not shown.

View File

@@ -278,7 +278,9 @@ Extract transcripts from YouTube videos.
```json
{
"videoId": "Video ID",
"title": "Video Title",
"description" : "Video description...",
"transcript": "Full transcript text..."
}
```
@@ -335,7 +337,9 @@ Response:
```json
{
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"description": "The official video for “Never Gonna Give You Up” by Rick Astley...",
"transcript": "We're no strangers to love. You know the rules and so do I..."
}
```

View File

@@ -19,8 +19,10 @@ type YouTubeRequest struct {
}
type YouTubeResponse struct {
Transcript string `json:"transcript"`
Title string `json:"title"`
Transcript string `json:"transcript"`
VideoId string `json:"videoId"`
Title string `json:"title"`
Description string `json:"description"`
}
func NewYouTubeHandler(r *gin.Engine, registry *core.PluginRegistry) *YouTubeHandler {
@@ -55,6 +57,12 @@ func (h *YouTubeHandler) Transcript(c *gin.Context) {
return
}
var metadata *youtube.VideoMetadata
if metadata, err = h.yt.GrabMetadata(videoID); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
var transcript string
if req.Timestamps {
transcript, err = h.yt.GrabTranscriptWithTimestamps(videoID, language)
@@ -66,5 +74,5 @@ func (h *YouTubeHandler) Transcript(c *gin.Context) {
return
}
c.JSON(http.StatusOK, YouTubeResponse{Transcript: transcript, Title: videoID})
c.JSON(http.StatusOK, YouTubeResponse{Transcript: transcript, VideoId: videoID, Title: metadata.Title, Description: metadata.Description})
}

View File

@@ -1 +1 @@
"1.4.352"
"1.4.353"