Remove json suffix "supplemental-metadata"#375
Remove json suffix "supplemental-metadata"#375Wacheee wants to merge 3 commits intoTheLastGimbus:masterfrom
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". |
|
This worked for me, highly recommend it gets merged |
|
Just if some of you are interested, this is a fork of this repo with many new features: https://github.com/jaimetur/GooglePhotosTakeoutHelper/releases/tag/v5.0.5 |
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