-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Same file with identical content gets downloaded again every time Moodle-DL is executed #206
Comments
😅 There is probably something changing in the html file (that gets stripped out in markdown). |
Sorry I am not really a programmer. I can code basic scripts but not sophisticated softwares like Moodle-DL. However, I can probably get whatever info you need if instruction is given. |
Please send me a screenshot of your course. Can it be that you have multiple lessons with the same name? |
Mh I just tested it to have two lessons with the same name. For me it works, without redownloading. So I guess it is really something changing in the description of the lessons. Its pretty funny that moodle adds links to the other lessons with the same name to the description ^^ (at least for one other lesson with the same name). If you have more than two lessons with the same name in the same section the links kind of make no sense. But moodle-dl downloads them correctly. So I need a call with you, so we can debug this together. Maybe on discord. Contact me via mail please |
you could also provide my the files that get always updated (including the old files) maybe I see there what is changing. I wonder even, what "Lesson 1 exer.md" should be? Because moodle-dl normaly does not create such names. |
Sorry for the late reply, I got a new account for a new Moodle instance and it is still having the issue: I suspect it is caused by multiple "section"(not sure if this is the right term) with the same name. |
That are not sections but labels. Labels have a name on moodle additionally to the text the label contains. If you make a copy of a label on moodle, it will add the "(copy)" suffix to the name of the copy. If two labels have the same name, moodle_dl will add the _01 suffix to one of the labels. If a label gets redownloaded, moodle-dl adds the (old) suffix to the file name of the old downloaded file. I have to investigate how we could fix this. I probably need more information from you, e.g. via mail. PS. you can turn of downloading of labels if you disable downloading descriptions. |
Would it be possible to add an option to prefix or suffix the downloaded file name with the ID of the label? For example, I see each label has a unique ID such as |
Not exactly like the data-id. The data-id comes not from the moodle database, but probably from some sort of web framework like Angular. But each label has an instance id and an module id, we could use these. Alternatively, we can use the sort order numbers, so that you would have a files ftructure like:
That is basically requested in #217 |
Description of the bug
There is a file in my moodle account that kept getting downloaded again every time I execute Moodle-DL. The old file then renamed to append _old_01.md
For example:
XXX_old_28.md
XXX_old_27.md
XXX_old_26.md
Steps to reproduce the issue
no argument
It says there are files that changed but the file is actually identical with no change in content.
See anonymized output below
Expected behavior
The file is only downloaded once if the content is identical, without moving old file to _old_XX.md
Possible Fix
Technical details
P.S. if you need a more detailed/anonymized log I can send it to you privately.
The text was updated successfully, but these errors were encountered: