-
-
Notifications
You must be signed in to change notification settings - Fork 256
Remove json suffix "supplemental-metadata" #375
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
base: master
Are you sure you want to change the base?
Conversation
Don't you just love it when companies change stupid things like this? Thank you for the fix @Wacheee this directly made this tool perfect for my use, lgtm yes i am just a random person who has no authority to say "lgtm" i am also not professional |
This fix worked for me too! The new json suffix "supplemental-metadata" were making troubles for the script to work Thank you @Wacheee |
This works better, till a point where a lot of videos still shows up in the date-uknown folder. |
I noticed a potential issue with the current renaming logic that may cause file name collisions. Specifically, when there are multiple image variants like:
both end up being renamed to In my own version, I updated the regex to optionally capture the numeric suffix (e.g. final regex = RegExp(
r'^(.*\.[a-z0-9]{3,5})\..+?(\([1-9][0-9]*\))?\.json$',
caseSensitive: false,
); Then I used: final newName = '${match.group(1)}${match.group(2) ?? ''}.json'; This way, the renamed files become:
This avoids skipping and preserves the distinction between file variants. |
The way I implemented it is to add another name mangling function in json_extractor.dart. It's a lot less code for the same end goal, assuming this is the right place to put it.
I found an interesting example of it's application here.
It looks like the order of operations for the name mangling here is: Thus we would need to try 2 different file matching variants in the json_extractor. One without supplemental-metadata for older Google exports, and one with it for the new ones. We also need some more intelligent applications of the |
@astronyu I've found that some of my videos still get put into the "date-unknown" folder, but when I upload them to my Synology NAS they automatically get attached to a photo with a date as some sort of "live photo". |
Added an option to remove the "supplemental-metadata" and its variants ("supplem", "supplementa", etc) suffix from JSON to prevent issues with metadata before gpth run the copies/move functions. Fixes: #353