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

Fix MAC computation performance issue; add CLI entrypoint script for quickly downloading files without logging in #76

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

pgp
Copy link

@pgp pgp commented Jan 26, 2022

Hi, as the subject says, the main modifications in this PR are:

  • A performance fix (i.e. fixes high CPU usage) in the MAC computation step for each chunk
  • An entrypoint script (meganz) which accepts a mega.nz link, and optionally a destination path, for comfortably downloading links without login (indeed, this was the main feature I needed when I started modifying this code, because it seems the guys of youtube-dl have no intention of adding mega.nz support)
  • A progress bar for download, using the tqdm library
  • A fix to correctly close and flush buffers of the temporary file used for downloading, before moving it to the destination directory (spurious errors were given on Windows - e.g. file is used by another process - and empty files were created on linux in the destination directory, instead of moving the actual output, in case of few-bytes files)
  • Follow redirects (e.g. from URL shortening services) till a mega link is found

Regards

pgp and others added 26 commits January 18, 2022 13:15
…ad to multiple of 16 bytes for MAC calculation when it's needed
…ding to the destination path, without creating a temporary file
@afterdelight
Copy link

afterdelight commented May 20, 2022

could you add file archive support like youtube-dl?

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