Open jrh03 opened 3 months ago
Sorry, I haven't submitted a PR before. Also, the first commit that you may see in this PR was completely unnecessary as my issue was due to the config file.
Thanks for the PR. I understand that it might be confusing to have a directory named "ultraDocumentBody" instead of having the files in the parent directory.
However, there are two concerns I have.
If these two are not an issue anymore then rather than manually checking if the content is ultra_body in the content base class, it's better to change this in the create_dir
property of the content handler classes. I'm pretty sure right now I have set it as a classmethod, but this could easily depend on the content itself for Document. Thus, in the Document class, ultraDocumentBody
content will not create a directory and will pass the same path it got passed to its content body links.
The previous body processing issue was simply to do with the config file (I figured after an hour or two). After deleting it everything began to redownload as expected.
The only other issue I had left was that some files stored in the ultraDocumentBody had them stored under an extra, unnecessary directory titled "ultraDocumentBody". These changes seem to fix that. This may not be the optimal implementation, however it seems simple and works for me.
Line 56, the handling of the ignoring in the write content method, may also not need the is_ultra flag, however after checking out the directory it seems to work well with it there, hence I haven't removed it.