Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

BenSabry/SynologyMediaHelper

Repository files navigation

⛔️ DEPRECATED

This repository is now deprecated and no longer being maintained. We have moved to a new repository architecture for general purpose Media Organization, which can be found here.

Synology Media Helper

Synology Media Helper is a utility designed to rectify issues with media file organization in your Synology Photos App, Issues like these.

Downloads

Latest release v0.4.0-alpha
All releases releases

Story

I’m a proud owner of a Synology (DS720+) and I must say, I’m quite fond of it, especially the Photos/Drive apps.

Previously, I was a Google Photos user, so I downloaded a complete backup of all my media from Google and transferred it to the Synology Photos folder. However, I encountered a significant issue - the order of the media. All my media was arranged according to the date I uploaded it to Synology, not the creation date or date taken, etc. After some research, I found numerous online discussions about this issue, even Synology Photos’ solution of manually modifying the image date is good but not feasible for a batch of more than 20,000 files!

So, I decided to tackle this problem head-on and develop my own solution. After several days of development and testing on my own media library, I’m happy to report that it’s complete and all my files are now properly sorted on Synology Photos.

Why am I sharing this? Because I experienced this frustrating problem and I want to help others who might be facing the same issue. If you’re interested, you can try it out and share your feedback.

Please remember to BACKUP your media before trying anything new, whether it’s from me or anyone else (I recommend using Synology Snapshot Replication). Lastly, a big thank you to Synology for the excellent combination of software and hardware. I truly enjoy your product.

Recommendations

a. BACKUP your media files first (you may use Synology Snapshot Replication)
b. Connect your PC to SynologyNAS using Cable not WIFI for best performance
c. Increase the TasksCount in AppSettings.json (recommended: 2, best: CPU Cores count)

How to use

  1. From your Windows PC open photos library directory on Synology from Windows Network (SMB)
  2. Add the path of your library to Sources in AppSettings.json file
  3. run the executable SynologyMediaHelper.exe and wait

How it works

  1. Scan library files and directories added to Sources in AppSettings.json
  2. Check if the file already has CreationDate
       2.1. if so: Move the file to proper directory MediaLibrary\Year\Month\File.
       2.2. else:
          2.2.1. Extract date from filename if any and all dates from file info and choose the oldest
          2.2.2. Update the file info CreationDate (after creating temp file as Backup)
          2.2.3. Attempt to fix file info (like duplications/incorrect offsets ...etc)
          2.2.4. Move the file to proper directory MediaLibrary\Year\Month\File.

  3. Clear temp files (which created as backup incase App/Windows closed improperly)
  4. Delete empty directories

Now just wait and your Synology will reindex media files and reorder them again based on updated info

Fixable Issues

Synology Photos: Not Using Taken Date
Synology Photos: organizes everything by modified date instead of creation date
Synology Photos: Indexing photos/videos with wrong date
Synology Photos: Best practice for photos with no taken date

Tech/Tools used

.NET: is the free, open-source, cross-platform framework for building modern apps and powerful cloud services.
ExifTool: is a customizable set of Perl modules plus a full-featured command-line application for reading and writing meta information in a wide variety of files.

AppSettings

TasksCount: (number) of Tasks/Threads to work simultaneously.
EnableLog: (flag) to log actions to log.txt files found in .\Temp\Log.
AttemptToFixMediaIncorrectOffsets: (flag) to fix file info (like duplications/incorrect offsets ...etc)
ClearBackupFilesOnComplete: (flag) Clear temp files on complete.
DeleteEmptyDirectoriesOnComplete: (flag) Delete empty directories on complete.
Sources: (text) target directory path where all files will be transferred post-processing..
Sources: (array) paths of libraries or files which will be scanned

Example:
{
  "TasksCount": 2,
  "EnableLog": true,
  "AttemptToFixMediaIncorrectOffsets": true,
  "ClearBackupFilesOnComplete": true,
  "DeleteEmptyDirectoriesOnComplete": true,
  "Target": "\\SynologyNAS\home\Photos\PhotoLibrary",
  "Sources": [
    "\\SynologyNAS\home\Photos\MobileBackup",
    "D:\Data\Media\Photos\Personal\Family",
    "\\SynologyNAS\home\GraduationPhoto.jpg",
    "\\SynologyNAS\home\GraduationVideo.mp4",
  ]
}

About

Synology Media Helper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages