Suggestions for Synology Users #157
Replies: 11 comments 49 replies
-
Sponsoring you for the year @TheLastGimbus as a thank you! |
Beta Was this translation helpful? Give feedback.
-
Nice of you! If you would want to, we could make some
Hmm, if you intend to leave them there, this shouldn't be an issue, because gpth copies each file, changes it's date and it's done - it doesn't modify them afterwards or anything. But yeah, you may want to stop this
Umm... ;_; Bro, you can just use cli options to skip whole desktop-enviroment-pickers stuff: $ unzip takeout.zip
$ gpth --input takeout/ --output my-photos/
# Should work perfectly on any distro Funny thing, gpth is recommended in offical synology faq 😅 https://kb.synology.com/en-in/DSM/tutorial/How_do_I_migrate_photos_from_Google_Photos although it's old python version
Big thanks! Will definietley enjoy some coding'n'pizza with this <3 |
Beta Was this translation helpful? Give feedback.
-
Hello, everyone. Thanks for your work. I do not understand many steps due to language and know how. I'm getting freak to fix this problem on my photo folder in synology. Is there some one that could explain me what to do step by step for running it? |
Beta Was this translation helpful? Give feedback.
-
OrganizeTakeoutPhotosScript (based on GPTH Tool) to Process Google Takeout Photos (Fix metadata, Identify Live Pictures, Organize per year/month folders, separate Albums, Fix Symbolic Links, Find Duplicates, Manage Duplicates, Homogenize Albums folders name, Import Albums to Synology Photos, Delete Empty Synology Photos Albums and much more) Download Script:Download the script either Linux, MacOS or Windows version (for both x64/amd64 or arm64 architectures) as you prefeer directly from following links: Linux:: Mac OS: Windows: Instructions:You can copy and unzip the downloaded Script into any local folder or to any Shared folder of our Synology NAS. After that you have to download Takeout Zip's files from Google Takeout and paste the ZIP files onto the folder called 'Zip_files' within the folder script which is the default folder to process Takeout ZIP files, or if you prefeer you can put them in any other subfolder and use the option '-z, --zip-folder <folder_name>' to indicate it. (Note: paste all Zip files downloaded from Google Takeout directly on that folder, without subfolders inside it). Then you just need to call it depending on your environment:
Syntax:
Example of use:
Withh this example, the script will unzip all zip files found under ./Zips folder into ./Takeout folder. Normal Mode: Process Explained:The whole process will do the next actions if all flags are false (by default):
The result will be a folder (called Takeout_fixed_{timestamp} by default, but you can specify any other with the option '-t, --takeout-folder <folder_name>' or change the default suffix 'fixed' by any other using the option '-s, --suffix <desired_suffix>') which will contains:
Finally you just need to move the output folder (Takeout_fixed_{timestamp} by default) into your /home/Photos folder and let Synology to index all files (it will take long time). After that you will be able to explore your photos chronologycally on the Synology Photos App, and all your Albums will be there when you explore the library by folder instead of chronologycally. It was very useful for me when I run it to process more than 300 GB of Photos and Albums from Google Photos (408559 files zipped, 168168 photos/video files, 740 albums) and moved it into Synology Photos. The whole process took around ~8.5 hours (or ~3 hours without last two optional steps) and this is the time split per steps):
NOTE: Step 8 is disabled by default, and is only recommended if you want to save disk space and want to avoid having the same physical file in more than one folder (in case that the same file belongs to multiples Albums). EXTRA MODES:Additionally, this script can be executed with 9 Extra Modes: Extra Mode: Fix Symbolic Links Broken:From version 1.5.0 onwards, the script can be executed in 'Fix Symbolic Links Broken' Mode.
Example of use:
With this example, the script will look for all symbolic links within OUTPUT_FOLDER and if any is broken, Extra Mode: Find Duplicates:From version 1.4.0 onwards, the script can be executed in 'Find Duplicates' Mode. In this mode, the script will find duplicates files in a smart way based on file size and content:
Example of use:
With this example, the script will find duplicates files within folders ./Albums and ./ALL_PHOTOS, Extra Mode: Process Duplicates:From version 1.6.0 onwards, the script can be executed in 'Process Duplicates' Mode. In this mode, the script will process the CSV generated during 'Find Duplicates' mode and will perform the Action given in column Action for each duplicated file.
Example of use:
With this example, the script will process the file ./Duplicates/Duplicates_revised.csv Extra Mode: Rename Albums Folders Mode:From version 2.0.0 onwards, the script can be executed in 'Rename Albums Folders' Mode. With this Extra Mode, you can rename all Albums subfolders (if they contains a flatten file structure) and homogenize all your Albums names with this format: 'yyyy - Album Name' or 'yyyy-yyyy - Album Name', where yyyy is the year of the files contained in each Album folder (if more than one year is found, then yyyy-yyyy will indicate the range of years for the files contained in the Album folder.) To define the <ALBUMS_FOLDER> you can use the new Flag: -ra, --rename-albums <ALBUMS_FOLDER> Recommendation: Use this Extra Mode before to create Synology Photos Albums in order to have a clean Albums structure in your Synology Photos database. Example of use:
With this example, the script will rename all subfolders within ./My_Albums_Folder (only first subfolder level) according to the format described above. If the subfolder does not contains any file, the folder will not be renamed. Note Synology Photos SupportFrom version 2.0.0 onwards, the script can connect to your Synology NAS and login into Synology Photos App with your credentials. The credentials need to be loaded from 'Synology.config' file and will have this format: Example 'Synology.config':
Extra Mode: All in One Shot:From version 2.1.0 onwards, the script can be executed in 'All in One Shot' Mode. If you configure properly the file 'Synology.config' and execute this Extra Mode, the script will process your Takeout Zip files, will process them, and will connect automatically to your Synology Photos database to import all your Photos & Videos automatically to Synology Photos database creating the same Albums that you have exported in your Takeout files. To execute this Extra Mode, you can use the new Flag: -ao, --all-in-one Example of use:
With this example, the script will extract all your Takeout Zip files from ./Zip_files folder, will process them, and finally will connect to Synology Photos database to create all Albums found and import all the other photos without any Albums associated. Extra Mode: Extract Albums from Synology Photos:From version 2.3.0 onwards, the script can be executed in 'Extract Albums from Synology Photos' Mode. If you configure properly the file 'Synology.config' and execute this Extra Mode, the script will connect to Synology Photos and extract those Album(s) whose name is in <ALBUMS_NAME> to the folder 'Synology_Photos_Albums' within the Synology Photos root folder. To extract several albums you can separate their names by comma or space and put the name between double quotes. i.e: --extract-albums-synology-photos "album1", "album2", "album3". To extract ALL Albums within in Synology Photos database use 'ALL' as <ALBUMS_NAME>. The album(s) name <ALBUMS_NAME> can be passed using the new Flag: -ea, --extract-albums-synology-photos <ALBUMS_NAME> Important <ALBUMS_NAME> should exist within your Synology Photos Albums database, otherwise it will no extract anything. Example of use:
With this example, the script will connect to Synology Photos database and extract the Albums "Album 1", "Album 2", "Album 3" with all the photos and videos included on them into a subfolder of 'Synology_Photos_Albums' folder Extra Mode: Create Albums in Synology Photos:From version 2.0.0 onwards, the script can be executed in 'Create Albums in Synology Photos' Mode. If you configure properly the file 'Synology.config' and execute this Extra Mode, the script will connect automatically to your Synology Photos database and will create one Album per each Subfolder found in <ALBUMS_FOLDER> that contains at least one file supported by Synology Photos and with the same Album name as Album folder. The folder <ALBUMS_FOLDER> can be passed using the new Flag: -ca, --create-albums-synology-photos <ALBUMS_FOLDER> Important <ALBUMS_FOLDER> should be stored within your Synology Photos main folder in your NAS. Typically, it is '/volume1/homes/your_username/Photos' and all files within <ALBUMS_FOLDER> should have been already indexed by Synology Photos before you can add them to a Synology Photos Album. You can check if the files have been already indexed accessing Synology Photos mobile app or Synology Photos web portal and change to Folder View. If you can't see your <ALBUMS_FOLDER> most probably is because it has not been indexed yet or because you didn't move it within Synology Photos root folder. Example of use:
With this example, the script will connect to Synology Photos database and process the folder ./My_Albums_Folder and per each subfolder found on it that contains at least one file supported by Synology Photos, will create a new Album in Synology Photos with the same name of the Album Folder Extra Mode: Delete Empty Albums in Synology Photos:From version 2.0.0 onwards, the script can be executed in 'Delete Empty Albums in Synology Photos' Mode. If you configure properly the file 'Synology.config' and execute this Extra Mode, the script will connect automatically to your Synology Photos database and will look for all Empty Albums in Synology Photos database. If any Empty Album is found, the script will remove it from Synology Photos. To execute this Extra Mode, you can use the new Flag: -de, --delete-empty-albums-synology-photos Example of use:
With this example, the script will connect to Synology Photos database and will delete all Empty Albums found. Extra Mode: Delete Duplicates Albums in Synology Photos:From version 2.0.0 onwards, the script can be executed in 'Delete Duplicates Albums in Synology Photos' Mode. If you configure properly the file 'Synology.config' and execute this Extra Mode, the script will connect automatically to your Synology Photos database and will look for all Duplicates Albums in Synology Photos database. If any Duplicated Album is found, the script will remove it from Synology Photos. To execute this Extra Mode, you can use the new Flag: -dd, --delete-duplicates-albums-synology-photos Example of use:
With this example, the script will connect to Synology Photos database and will delete all Duplicates Albums found. Tip Additional Trick!When prepare Google Takeout to export all your Photos and Albums, select 50GB for the zip file size and select Google Drive as output for those Zip files. On this way you can just Download all the big Zip files directly on your Synology NAS by using the Tool Cloud Sync (included on Synology App Store) and creating a new synchronization task from your Google Drive account (/Takeout folder) to any local folder of your Synology NAS (I recommend to use the default folder called 'Zip_files' within this script folder structure) I hope this can be useful for any of you. Jaime Tur (@jaimetur) - 2024. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the great work in primis!!
btw:
Getting this "cannot execute binary file: Exec format error"
I followed all the instruction.. I'm on a Mac by ssh Synology.
Files under Zip_Files
command that I used: ./OrganizeTakeoutPhotos --zip-folder ./Zips --takeout-folder ./Takeout --albums-structure year/month
Any help?
|
Beta Was this translation helpful? Give feedback.
-
In Windows you have you use back slash “\” instead of “/“ and you don’t need to start the command with ./
El 4 ene 2025, 15:13 +0100, vixius ***@***.***>, escribió:
… > If you want to run it from Windows you should open a CMD or PowerShell terminal and execute the script with the propper arguments. FYI: I'm working on a Linux_arm64 version. Hopefully I could finish it soon. Keep you posted.
Where is the mistake :( ?
image.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks.
Yes, you can check duplicates in any folder(s). You can provide one or more folder and the script will look for duplicates in all of them. Give more priority to the file found in the first folder. Check the —help section or the readme.md for more info.
El 6 ene 2025, 22:09 +0100, vixius ***@***.***>, escribió:
… > Happy to see that at least Windows version works for you. Can you try now to download linux_arm64 versoin and let me know if it works?
Yeeees It works like a charme, Great Job! I'd like to offer you a beer!
Is there a way to check duplicates inside photo folder in nas? Because now I have some foto from iPhone already in photo folder in as and other from google takeout. But is it possible to do a duplicate check directly on photo folder on nas?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Added Release 2.3.0 to OrganizeTakeoutPhotos Script Release Notes:Release: 2.3.0
Download Script:Download the script either Linux, MacOS or Windows version (for both x64/amd64 or arm64 architectures) as you prefeer directly from following links: Linux:: Mac OS: Windows: Full Changelog: jaimetur/OrganizeTakeoutPhotos@1.2.0...2.3.0 |
Beta Was this translation helpful? Give feedback.
-
Hello! First of all, thank you for your work @jaimetur. I did everything on my PC and it works like a charm. I'm stuck at the last step, the extra mode -ca to create the albums on Synalogy Photos. I tried it on version 2.2.1 and 2.3.0, but I'm getting connection errors. My Synology.config file is properly configurated and I tried both in Powershell SSH running on Windows and Linux ARM versions and the result is the same. I've disabled firewall, and 2-factor authentication with no results. The indexing service is properly started on my NAS as stated in the log but I'm getting the error. Can you help me? |
Beta Was this translation helpful? Give feedback.
-
Hi new to Synology, been awhile since I’ve worked with Linux. Connecting to a DS223 (DSM Ver 7.2.2-72806) with an M2 Mac Mini via SSH. Script version 2.3.0_linux_arm64. I have the script folder in the same folder as the Takeout Folder. Used the following command. Got to Step 3 and encountered the following error Any help/guidance would be appreciated. TIA |
Beta Was this translation helpful? Give feedback.
-
Are you sure that you are using the right architecture? Can you try with amd64 instead of arm64?
On the other hand, is not a good idea to run the script from the same takeout folder, I would move it on folder up, because there is some options that make the script to delete takeout folder when finish.
|
Beta Was this translation helpful? Give feedback.
-
Thanks for this script, this is super helpful. I'm running a Synology and thought I'd contribute a couple tips that others might find useful.
./gpth-linux
from SSH, it likely won't work because (I believe) it is expecting a typical linux window environment. What worked for me was to run this on another machine and select the folders over the Samba share, so mount thesmb://synology
, selectphoto
or some other directory, then running./gpth-macos
Beta Was this translation helpful? Give feedback.
All reactions