Commit Graph

10 Commits

Author SHA1 Message Date
Joren ea9d4dc2dc 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.
2026-05-16 22:37:45 +02:00
Joren 333e784ce9 fix: use module_item_redirect OAuth flow for ExternalUrl Panopto items
The Canvas app authenticates ExternalUrl items via:
  GET session_token?return_to=<module_item_redirect>?display=borderless
  → GET session_url → OAuth2 confirm
  → POST /login/oauth2/accept
  → Panopto Login.aspx?code= → CookieCheck.aspx (sets Panopto cookies)

Our previous code used sessionless_launch (the course-level Panopto tool)
for direct Panopto links, which gave wrong/incomplete Panopto cookies.

Added DownloadExternalPanoptoURL() that replicates the exact app flow.
Falls back to DownloadVideo if no Panopto cookies are obtained.
Both List.aspx (folder playlists) and Viewer.aspx (single videos) are
handled with the correct yt-dlp flags and output templates.
2026-05-16 22:33:22 +02:00
Joren 13063c6cc5 add video-only mode 2026-05-16 17:33:40 +02:00
joren 9691ecd7a5 Fix course files 2026-03-11 20:06:46 +01:00
joren b8e6180b35 add numbering 2026-03-11 19:56:37 +01:00
joren 8591ae283e Add support to download all the users courses 2026-03-11 19:36:54 +01:00
Joren 05ed4dd4ed Prevent dupes in fo mode 2026-03-11 17:51:34 +01:00
Joren 352315b041 Add files only mode 2026-03-11 17:37:18 +01:00
Joren fbf75c88b3 Add support for hyperlinks 2026-02-13 20:42:53 +01:00
Joren ea91e2a16e first commit 2026-02-13 18:49:29 +01:00