Sunday, November 30, 2025

MediaSlurper - November Updates

Another month, another bunch of updates to my "MediaSlurper" tools to fix a bunch of annoyances that have be gnawing away at me every time I'd been using them recently.

Such is the curse of writing personal tools: If it breaks, no one will magically fix it for you between when it broke and the next time you use it!  On the other hand though, considering that I literally use these things *MULTIPLE* times every day   (like, 2-3 times most nights to run backups of my devices), deciding to build these and getting them working well for the 95% of the times I use them has been one of the most satisfying and worthwhile things I've done this year!

Anyway, this month, I finally got annoyed enough to look seriously into the following 2 things:

   1) A longstanding bug in my SD Card (Camera Photos) download tool, relating to the duplicate-download prevention algorithm.  Basically, the problem was that it was redownloading any images that had their modified time bumped due to something like a description being added (even if subsequently removed), OR if I deleted the copy locally (i.e. it as out of focus), without having gotten around to removing it from the camera.

   2)  An optimisation to the login prompts for my Android FTP downloading tool, so that I wouldn't need to punch in the IP + Port numbers (or confirm the defaults) each time I used the tool, while retaining the ability to actually dial in a new value on days when new IP + Port values may randomly be required.

 

 

Fixing that duplicate-detection problem proved to be quite tricky. So far, I've put in place a workaround heuristic that works "well enough" so far, in that it only works if we assume that we don't have situations where several consecutive files get a caption /  star-rating added, causing this heuristic to fail. OR if the enumeration somehow puts sibling files out of order, and thus breaks the comparison heuristics...

For a proper fix, I'd have to properly bite the bullet and add an actual "last downloaded file" info to the memory card, and then try to infer which files are "newer" than that one... Maybe I can get it working down to a date-only level (since the hour values now need to be removed to deal with a baffling problem where changing from daylight savings time earlier in the year resulted in *ALL* files from the SD card now exhibiting timstamps that appeared to appear to be from a different timestamp. I still don't quite get it (and it may well be some quirk of those FAT32 timestamps + Python's datetime library). Nevertheless, the hack I used to patch around that problem urgently back then is still in place... time is hard! 

No comments:

Post a Comment