Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SE-4161] Add Download Transcripts button #6

Merged
merged 9 commits into from
Mar 17, 2021
Merged

[SE-4161] Add Download Transcripts button #6

merged 9 commits into from
Mar 17, 2021

Conversation

gabor-boros
Copy link
Contributor

@gabor-boros gabor-boros commented Mar 8, 2021

This PR adds a new feature to download available transcripts for a Wistia video. In case no transcripts are available, the download button won't be shown. Furthermore, the transcripts are downloaded as a Zip archive containing all available transcripts.

The srt files' content is retrieved from the Wistia API and stored in a temporary directory such as the Zip archive to save memory. The Zip archive transferred as an HTTP response, not served as a static file.

Dependencies: None

Screenshots:

Screenshot 2021-03-07 at 20 18 44

Sandbox URL: N/A

Merge deadline: ASAP

Testing instructions:

  1. Start Studio and LMS
  2. Get an access token (https://<YOUR_ACCOUNT>.wistia.com/account/api)
  3. Upload a video with transcript (attached to make it easier, but you can use any video and transcript)
  4. Setup the XBlock as described in the README
  5. Set the API token in the component settings
  6. View the video in LMS
  7. Validate that the transcripts can be downloaded

Author notes and concerns:

N/A

Resources

Reviewers

Copy link

@pkulkark pkulkark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabor-boros LGTM 👍

  • I tested this: verified the download transcripts button works as expected
  • I read through the code
  • I checked for accessibility N/A
  • Includes documentation

@thraxil thraxil requested a review from OmarIthawi March 9, 2021 10:21
Copy link
Contributor

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Gabor for adding this nice feature! I've checked the PR and there's no blockers for it, except for one improvement that would be awesome to make which is the use of pytest in combination with removal of run_tests.py.

run_tests.py can add maintenance burden that is unnecessary so I added few suggestions that I've used in other XBlocks to manage such issue in reusing workbench settings when testing XBlocks.

Please let me know what do you think.

README.md Outdated Show resolved Hide resolved
test_settings.py Show resolved Hide resolved
@gabor-boros
Copy link
Contributor Author

Hello @OmarIthawi,
Thank you for the review! I'll take care of the feedback during the upcoming week.

@gabor-boros
Copy link
Contributor Author

@OmarIthawi This is now ready for your review. Please note, that I added a requirements-test.txt to make test dependency installs easier.

The related build: https://travis-ci.com/github/gabor-boros/xblock-wistia/builds/220349595

Copy link
Contributor

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @gabor-boros for the pytest refactoring and going for the extra mile!

@OmarIthawi OmarIthawi merged commit 970385c into appsembler:master Mar 17, 2021
@OmarIthawi
Copy link
Contributor

@gabor-boros you can now use the tag to install this PR: https://github.com/appsembler/xblock-wistia/releases/tag/v0.3

We don't have it published on pypi yet.

@gabor-boros gabor-boros deleted the gabor/add-srt-download branch March 17, 2021 14:10
@gabor-boros
Copy link
Contributor Author

Thank you @OmarIthawi for merging! 🚀

gabor-boros added a commit to open-craft/xblock-wistia that referenced this pull request Jun 1, 2021
The "download transcripts" button already exists, though it actually
downloads the captions not transcripts. Hence that button -- and the
related code -- is renamed to use the term "captions". Because the
original intention was to add a download transcripts button in appsembler#6, this
commit adds the originally required button and functionality as well.

Besides that, it worth mentioning the transcripts are different in a way
compared to captions in a way that it is not bind to any language.
gabor-boros added a commit to open-craft/xblock-wistia that referenced this pull request Jun 2, 2021
The "download transcripts" button already exists, though it actually
downloads the captions not transcripts. Hence that button -- and the
related code -- is renamed to use the term "captions". Because the
original intention was to add a download transcripts button in appsembler#6, this
commit adds the originally required button and functionality as well.

Besides that, it worth mentioning the transcripts are different in a way
compared to captions in a way that it is not bind to any language.
gabor-boros added a commit to open-craft/xblock-wistia that referenced this pull request Jun 11, 2021
The "download transcripts" button already exists, though it actually
downloads the captions not transcripts. Hence that button -- and the
related code -- is renamed to use the term "captions". Because the
original intention was to add a download transcripts button in appsembler#6, this
commit adds the originally required button and functionality as well.

Besides that, it worth mentioning the transcripts are different in a way
compared to captions in a way that it is not bind to any language.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants