-
-
Notifications
You must be signed in to change notification settings - Fork 991
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
[Question] How to put metadata in subdirectory #520
Comments
Not sure if I understand that correctly... What do you mean by "accomplished in-program"? Like by using the But honestly, I think you've already described the optimal solution here, using a little script. Should be easy enough with Bash, and is definitely easy with PowerShell, which I would use (because I know that by heart). 800 directories does not sound that much to me, to be honest, I don't understand why that should take a lot of time. Unless maybe those JSON files you are moving into a sub-directory are actually kinda huge? |
Using the
Moving files within a filesystem costs (almost) nothing, so filesize shouldn't be an issue. Going though 800 directories on the other hand can take some time, if |
By "accomplished in-program", I meant within gallery-dl and its configuration, without having to execute something else manually/externally. Part of why my script takes a while is probably because I have it scan for all of the images/videos, which then checks if there is a json file associated to move it to the subfolder. So whether or not it finds a json, it'll go through each and every media file. Useful cause it lets me log which files don't have metadata. Not efficient for simple moving though, but frankly it was the easiest way for me to avoid jumping into the metadata folder and making another metadata subfolder when i was scanning the folders recursively (though there are probably more elegant ways). Anyways, thanks for the input from both of you. The exec processor does seems to be the best way to do this. I somehow missed this as a possible solution. I did run into some errors trying to set it up, but after updating gallery-dl I've got it to work. This is what I came up with:
It seems to work very well so far, but I'll refrain from closing this until I'm absolutely sure. Thank you for the solution! |
Zero issues through my testing. When a single item fails though, the final command does not execute, but that's the expected result based on the "after all files have been downloaded successfully", and I'm not bothered by it. Thanks again! |
Concerning "in-program" solutions: There is now a |
I also wanted to move all metadata files to a subfolder, but using a one-liner to store all metadata files per download job in a subfolder (called '_metadata'). I made two solutions, a classic one with Classic version with
|
|
Thanks for clariginying @mikf, especially since the documentation regarding this is not crystal clear. So Gallery-dl is a fantastic tool, I just wish that the documentation was a bit more extensive. |
Hello once again! Been making good use of your program for the past months, the addition of tweet content into the metadata really has been a live saver.
Anyways, I've been trying to figure out the best way to have the metadata file to be put into a subdirectory is. After tinkering with the postprocessors and other config settings with no luck, I eventually just made an external script to crawl all the folders and move all JSON files into a "metadata" subfolder. While it works, it takes a while since I have 800+ folders, and it incurs a lot of useless HDD reads for most of the metadata that has already been moved.
So, here is my question: What's the best way this can be accomplished in-program?
Thanks!
The text was updated successfully, but these errors were encountered: