Gulivertx / synology-photos-auto-sort

Script to use exiftool on a Synology NAS or any bash environment to auto sort images from a folder
MIT License
54 stars 16 forks source link

Mac Compatibility #9

Open very-old-guy opened 1 year ago

very-old-guy commented 1 year ago

HI,

I really like the features in your script and I can get it to work on my Synology NAS but it is very slow as I have many many photos/videos that I am trying to organise. Would love to get it to work on my Mac if possible. I try and run the script and I get the following errors:

`Source folder : /Volumes/home/photos-to-sort/Family-Photos Target folder : /Volumes/home/photos-to-sort/Family-Sorted-2

Allowed formats: jpg JPG jpeg JPEG heic HEIC mov MOV heiv HEIV m4v M4V mp4 MP4

Start process 200 files to process

-ne 0% /Users/laurie/Desktop/synology-photos-auto-sort.sh: line 137: ${DATE//:}_${TIME//:}.${EXT,,}: bad substitution 200 unmoved files, check for duplicate and process again...

-ne 0% /Users/laurie/Desktop/synology-photos-auto-sort.sh: line 214: ${DATE//:}_${TIME//:}.${EXT,,}: bad substitution`

I also had this error

`Start process 0 files to process

/Users/laurie/Desktop/synology-photos-auto-sort.sh: line 269: ${SOURCE/}@eaDir: bad substitution`

Just seeing if it is possible as I have no idea on how to fix this. Thanks for the script in either case.

Gulivertx commented 1 year ago

Hi, thank's for your feedback. I need to check on my mac and will come back to you.

Can you tell me which version on MacOS you have ?

Just see my code and seems to come from line 117 with echo -ne...

very-old-guy commented 1 year ago

Ventura 13.4.1

On my NAS if I point the script to work on a large number of files I also get it failing at times. Not always though. Talking > 6000 files. Less files than that it seems to work fine but takes a long time.

/volume1/homes/laurie/scripts/synology-photos-auto-sort.sh: xrealloc: subst.c:5979: cannot allocate 18446744071562067968 bytes (4308860928 bytes allocated)

EDIT: Think this was a corrupted video file causing the issues.

Thank you for the response

Gulivertx commented 1 year ago

Ok I tried on my Mac and get some errors.

Could you replace in the whole file all occurence ext,, by ext.