Add support for hyperlinks

This commit is contained in:
2026-02-13 20:42:53 +01:00
parent ea91e2a16e
commit fbf75c88b3
3 changed files with 56 additions and 17 deletions

View File

@@ -166,6 +166,14 @@ func (c *Client) DownloadModules(courseRoot string) {
fmt.Printf("%s- Found video tool: %s\n", indent, item.Title)
panopto.DownloadVideo(c.HTTPClient, c.AccessToken, c.CourseID, targetDir, item.URL, item.Title)
case "ExternalUrl":
if strings.Contains(item.ExternalURL, "panopto.eu") {
indent := strings.Repeat(" ", len(subHeaderStack)+1)
fmt.Printf("%s- Found direct video link: %s\n", indent, item.Title)
panopto.DownloadVideo(c.HTTPClient, c.AccessToken, c.CourseID, targetDir, item.ExternalURL, item.Title)
}
case "Page":
c.searchPageForVideos(item, targetDir)
}