So I was up late last night trying to get my script working again. Turns out the the script worked the whole time but since I upgraded my distro it turns out the the uploader simply doesn't work at all on my linux box. I don't have time to do any more testing or prep for other OSes until about a week from now but I've added the second phase script to the zip file for those that want to venture on with very little instruction. Basically the Synology assistant doesn't actually have any code in it to work on media files it is bundled with other utilities which it calls. The utility it uses to create thumbnails is convert (convert.exe on windows). So the second phase gets put in place of this file and rather than generating thumbnails it simply copies the thumbnails that were generated in phase 1 where Synology Assistant expects them to be. On Mac and Linux this should just work as long as you name the script convert with no extension, set execute permissions and replace the convert file bundled with Synology Assistant with the script (on Mac you'll have to right click on the .app file and hit show package contents to browse around). On windows it is more complicated. Windows doesn't treat scripts and executables the same from a shell perspective and the file is called convert.exe so an executable binary is expected. I haven't been able to test it but you can make an executable binary with py2exe just follow the tutorial here (obviously you'll need to install py2exe). I'm not sure if you'll run into any strange problems don't forget that a py2exe executable will need all the generated support files not just the convert.exe I'll get this sorted out in a week or two but I'm out for now. Good luck to anyone who attempts and remember I provide no warranty whatsoever the file is provided as is but I'm more than happy to respond to comments if there are any.
- Remember if you used the original script to change the folder with the thumbnails to customThumbs (remove the 2 if it is there.)
- Make sure that on linux and OS X the file is convert not convert.py (a file manager might hide the extension on you.) and on Windows convert.exe made with py2exe
- The script was originally supposed to use .customThumbs to hide the files and make the uploader ignore it but I thought that might be confusing for people who can't see hidden files. Anyway I left everything at customThumbs but the assistant thinks the folders are jpegs… I can fix this pretty easy when I get back by changing the extension of the folders too anyway you're going to get a bunch of "couldn't generate thumbnail errors" while it uploads a bunch of empty folders in all the customThumb folders but that is because those are folders and not files just let the system run its course and go to your photo share and delete all the customThumbs folders at the end. I don't have time to retype this post but in retrospect that is probably what happened on my linux box… Hours spent debugging…
- If you want the convert script to run even faster you can change the shutil.copy to a shutil.move near the end of the convert script. This will only speed things up if your photos are on the same hard drive as where Synology Assistant stores temporary files ( /tmp on linux and probably on OS X but I haven't checked Windows\temp on windows.) This way the thumbnails don't have to be copied but they will be deleted by Synology Assistant (I'm guessing you probably don't care :) )
- This is all the time I have to explain for now. Best of luck to any who attempt.