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:
@@ -240,7 +240,7 @@ func (c *Client) DownloadModules(courseRoot string) {
|
|||||||
indent := strings.Repeat(" ", len(subHeaderStack)+1)
|
indent := strings.Repeat(" ", len(subHeaderStack)+1)
|
||||||
fmt.Printf("%s- Found direct video link: %s\n", indent, item.Title)
|
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":
|
case "Page":
|
||||||
|
|||||||
Reference in New Issue
Block a user