fix: use item.HTMLURL (module_item_redirect) not item.URL for ExternalUrl auth

For ExternalUrl module items, the Canvas API returns url=null and
html_url=.../module_item_redirect/<id>. We were passing item.URL (empty)
causing the session_token call to return no session_url.
This commit is contained in:
2026-05-16 22:37:45 +02:00
parent 333e784ce9
commit ea9d4dc2dc

View File

@@ -240,7 +240,7 @@ func (c *Client) DownloadModules(courseRoot string) {
indent := strings.Repeat(" ", len(subHeaderStack)+1)
fmt.Printf("%s- Found direct video link: %s\n", indent, item.Title)
panopto.DownloadExternalPanoptoURL(c.HTTPClient, c.AccessToken, item.URL, item.ExternalURL, targetDir, item.Title)
panopto.DownloadExternalPanoptoURL(c.HTTPClient, c.AccessToken, item.HTMLURL, item.ExternalURL, targetDir, item.Title)
}
case "Page":