Moodle-DL
Moodle-DL copied to clipboard
Do not download large files
Description of the problem
Our moodle site contains a lot of media files, applications for students etc, and sometimes these files are pretty big. If I try to download them all, the total download size can be up to 40Gb. Of course I can exclude some extensions using https://github.com/C0D3D3V/Moodle-DL/wiki/Exclude-file-extensions but some large files have the same extension as submissions (e.g. zip) - I do not want to exclude them.
Solution
It would be nice to have an option to exclude large files from download.
Do you know what kind of file it is? Is it external or is it internal listed directly on the moodle course (so stored on the moodle server). Does it contain the size information, so does Moodle-dl display the total size of the file if it starts downloading or does it guess the file size while downloading (the total size increases while downloading)
These files are mainly video (mkv, mp4) and archives (zip, rar), and they are internal files (stored on moodle site). The files are listed in the log, although I do not see their size, only percentage remaining to download.
The problem is somewhat similar to https://github.com/C0D3D3V/Moodle-DL/issues/110 and I use the proposed solution to exclude files by extensions, unfortunately I cannot add *.zip
to the exclusions since some submissions are actually zip-files. For my personal purposes implementation of https://github.com/C0D3D3V/Moodle-DL/issues/135 would be sufficient, since I mainly interested in submissions also. But in general it would be nice to have an option for exclusion big files explicitly.
With version 2.3.2.4 you can now use the config option max_file_size
to define a max size in bytes of internal moodle files. Files bigger than that are completely ignored. This does not affect external files.
See also: https://github.com/C0D3D3V/Moodle-DL/wiki/Example-Config.json-and-Options