synology-photos-auto-sort icon indicating copy to clipboard operation
synology-photos-auto-sort copied to clipboard

Mac Compatibility

Open very-old-guy opened this issue 1 year ago • 3 comments

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.

very-old-guy avatar Jun 25 '23 12:06 very-old-guy

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...

Gulivertx avatar Jun 25 '23 16:06 Gulivertx

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

very-old-guy avatar Jun 25 '23 22:06 very-old-guy

Ok I tried on my Mac and get some errors.

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

Gulivertx avatar Jun 28 '23 15:06 Gulivertx