Files
synology-thumbgen/.specstory/history/2025-07-01_14-38Z-disabling-sync-destruction-for-local-thumbnails.md
2025-07-01 23:27:50 -06:00

14 KiB

Disabling sync destruction for local thumbnails (2025-07-01 14:38Z)

User

can we look into disabling on-demand sync's destruction and overriding behavior of locally-generated thumbnails? it excludes me from being able to generate thumbs for any file type that isn't supported by synology or on-demand sync protocols. it would be much easier to just allow me to generate everything locally. context:@2025-06-26_05-09Z-using-custom-thumbnails-for-blend-files.md @2025-06-26_05-53Z-using-generated-thumbnails-for-blendfiles.md


Assistant

Thought ProcessThe user is asking about disabling on-demand sync's behavior that's overriding their locally-generated thumbnails. Based on the context, it seems like they're dealing with Synology NAS and on-demand sync protocols that are interfering with their ability to generate custom thumbnails for file types that aren't supported by Synology.

Let me first look at the files in the project to understand what they're working with, and then read the attached files to get more context about their specific situation.

The project structure shows:

  • autoThumbs.bat
  • nascleanup.sh
  • psthumbgen.py
  • README.md
  • run_thumbgen_prompt.bat

This looks like a project specifically for generating thumbnails, likely for a Synology NAS system. Let me read the main files to understand the current implementation and the issue they're facing.


I'll help you investigate options for disabling on-demand sync's interference with your locally-generated thumbnails. Let me first examine your current thumbnail generation setup and then look into Synology's on-demand sync behavior.


Read file: psthumbgen.py


Read file: README.md


Read file: .specstory/history/2025-06-26_05-53Z-using-generated-thumbnails-for-blendfiles.md


Thought ProcessNow I have a good understanding of the situation. The user has a Python script (psthumbgen.py) that generates thumbnails for Synology Photo Station, and they're dealing with an issue where on-demand sync is overriding their locally-generated thumbnails.

From the files I've read:

  1. The script generates thumbnails in a special eaDir_tmp directory structure that gets moved to @eaDir on the NAS
  2. It supports various formats including videos (mp4, webm, etc.), PSD files, and Blender files
  3. It uses a multi-tier approach: Icaros cache → Windows providers → FFmpeg fallback
  4. The script is designed to work around limitations where Synology doesn't handle certain file types well

The user's issue is that on-demand sync is destroying or overriding their locally-generated thumbnails, preventing them from generating thumbnails for file types that aren't supported by Synology or on-demand sync protocols.

Let me search for more information about Synology on-demand sync behavior and see if there are ways to disable or work around this.


Searched web "Synology Drive Client on-demand sync disable thumbnail override locally generated thumbnails" • **5** results
Title URL
DSM 7.1 - Synology Drive - HOWTO: Revert Home folder sync back to Drive subfolder sync https://www.synoforum.com/threads/synology-drive-howto-revert-home-folder-sync-back-to-drive-subfolder-sync.12618/
Frequently Asked Questions about On-demand Sync https://kb.synology.com/en-uk/DSM/tutorial/Frequently_Asked_Questions_On_Demand_Sync
My files won't sync between Synology Drive and Drive clients. What can I do? https://kb.synology.com/en-us/DSM/tutorial/Why_are_files_not_synced_between_Synology_Drive_and_Drive_desktop_application
My files won't sync between Synology Drive and Drive clients. What can I do? - Synology Knowledge Center https://kb.synology.com/vi-vn/DSM/tutorial/Why_are_files_not_synced_between_Synology_Drive_and_Drive_desktop_application
My files won't sync between Synology Drive and Drive clients. What can I do? - Synology Bilgi Merkezi https://kb.synology.com/tr-tr/DSM/tutorial/Why_are_files_not_synced_between_Synology_Drive_and_Drive_desktop_application

Read file: autoThumbs.bat


Read file: nascleanup.sh


Thought ProcessNow I have a clearer picture. The user has a system where:

  1. They generate thumbnails locally using psthumbgen.py into eaDir_tmp directories
  2. They then SSH into the NAS and move these eaDir_tmp directories to @eaDir directories (which is what Synology uses for thumbnails)
  3. But Synology's on-demand sync is interfering with this process and overriding their locally-generated thumbnails

The web search didn't return very useful results, so let me search for more specific information about Synology's @eaDir behavior and ways to prevent it from being overwritten.


Searched web "Synology @eaDir directory prevent overwrite stop automatic regeneration custom thumbnails" • **2** results
Title URL
How do i stop the synology from making @eaDir folders? https://xpenology.com/forum/topic/2404-how-do-i-stop-the-synology-from-making-eadir-folders/
Exclude @eaDir directories from being scanned on XBMC http://xbmcnut.blogspot.com/2012/07/exclude-eadir-directories-from-being.html

Searched web "Synology DSM disable thumbnail generation indexing @eaDir photostation" • **2** results
Title URL
Disable indexing and generation of @eaDir directories on Synology NAS https://mikebeach10.rssing.com/chan-25669050/article15.html
Disabling File Indexing on Default Media Folders https://synology.wordpress.com/2017/08/16/disabling-file-indexing-on-default-media-folders/

Thought ProcessExcellent! Now I have much more useful information. From the search results, I can see several approaches to dealing with Synology's @eaDir behavior:

  1. Disabling indexing services completely - There are ways to stop the services that generate @eaDir folders
  2. Working around the system - Some approaches to prevent regeneration
  3. Understanding the mechanism - The indexing happens regardless of folder indexing settings in some cases

The key insights from the search results:

  1. From the XPEnology forum: There are commands to disable the services that create @eaDir folders
  2. From the Synology blog: The indexing service can be stopped with synoservicectl --stop synoindexd and there are queue files that can be managed
  3. The @eaDir folders are created by multiple services, not just media indexing

Let me look for the specific commands mentioned in the first search result about stopping @eaDir generation.


Searched web ""synoservicectl --stop" @eaDir disable Synology indexing services commands" • **2** results
Title URL
Disabling Universal Search on DSM https://www.tumfatig.net/2020/disabling-universal-search-on-dsm/
Starting or Stopping Synology Package from the Command-Line https://linuxhint.com/start-stop-synology-package-command-line/

Searched web "flynsarmy.com disable @eaDir Synology NAS complete guide" • **4** results
Title URL
How do i stop the synology from making @eaDir folders? https://xpenology.com/forum/topic/2404-how-do-i-stop-the-synology-from-making-eadir-folders/
Disable indexing and generation of @eaDir directories on Synology NAS https://mikebeach10.rssing.com/chan-25669050/article15.html
Synology NAS: Problems with hidden folder @eaDir... (With Solution) https://community.nethserver.org/t/synology-nas-problems-with-hidden-folder-eadir-with-solution/21166
Back Button https://community.ui.com/questions/How-can-i-delete-all-the-eaDir-Files-on-my-NAS/b831a542-94e8-47bc-9fa3-fbd0b9975284?page=0

Thought ProcessNow I have comprehensive information about the @eaDir issue and several approaches to solve it. Let me also search for information about the original flynsarmy.com guide that was mentioned as being effective.


Searched web "site:flynsarmy.com disable @eaDir synology services complete guide" • **4** results
Title URL
How do i stop the synology from making @eaDir folders? https://xpenology.com/forum/topic/2404-how-do-i-stop-the-synology-from-making-eadir-folders/
Disable indexing and generation of @eaDir directories on Synology NAS https://mikebeach10.rssing.com/chan-25669050/article15.html
Hide "@eaDir" folders when using NFS with Synology NAS - Suggestions - Firecore https://community.firecore.com/t/hide-eadir-folders-when-using-nfs-with-synology-nas/14108
Synology NAS: Problems with hidden folder @eaDir... (With Solution) https://community.nethserver.org/t/synology-nas-problems-with-hidden-folder-eadir-with-solution/21166

Thought ProcessBased on my research, I now have a comprehensive understanding of the issue and several approaches to solve it. Let me provide the user with a detailed analysis and multiple solutions for dealing with on-demand sync's interference with locally-generated thumbnails.

The key findings are:

  1. The Problem: Synology's on-demand sync and various indexing services actively regenerate @eaDir directories, overriding custom thumbnails
  2. Multiple Services: The @eaDir generation comes from several services, not just media indexing
  3. Possible Solutions: There are several approaches ranging from service disabling to workarounds

Let me create a comprehensive response with multiple approaches.


Based on your description and my research, I can help you tackle Synology's on-demand sync interference with your locally-generated thumbnails. Here are several approaches to disable or work around this behavior:

🎯 The Root Problem

Synology's @eaDir directories are generated by multiple services, not just media indexing:

  • synoindexd (media indexing)
  • pkgctl-SynoFinder (universal search)
  • iTunes Server and other media services
  • Drive Client sync protocols

Even when media indexing is "disabled" in DSM, these services can still recreate @eaDir directories and override your custom thumbnails.

🛠️ Solution 1: Service-Level Disabling (Most Effective)

SSH into your NAS and disable the core indexing services:

# Connect to your NAS
ssh nathan@hydra

# Stop and disable the main indexing service
sudo synoservicectl --stop synoindexd
sudo synoservicectl --hard-disable synoindexd

# Disable universal search (major @eaDir generator)
sudo synoservicecfg --hard-disable pkgctl-SynoFinder

# Stop iTunes service if not needed
sudo synoservicectl --stop pkgctl-iTunes
sudo synoservicectl --hard-disable pkgctl-iTunes

# Clear existing indexing queue
sudo rm -f /var/spool/syno_indexing_queue*

Verification:

# Check service status
sudo synoservicecfg --status pkgctl-SynoFinder
sudo synoservicectl --status synoindexd

🔄 Solution 2: Modified Workflow Protection

Enhance your current workflow to protect your custom thumbnails:


- # 1. Dry-run check (see what @eaDir directories exist)
- find /volume1/Hydra/Creative/artsy -type d -name '@eaDir' -exec echo '{}' \;
+ #!/bin/bash
+ 
+ # Enhanced NAS cleanup script with thumbnail protection
+ # Usage: ./nascleanup.sh /volume1/Hydra/path/to/directory
+ 
+ if [ $# -eq 0 ]; then
+     echo "Usage: $0 <directory_path>"
+     echo "Example: $0 /volume1/Hydra/Creative/artsy"
+     exit 1
+ fi
+ 
+ TARGET_DIR="$1"
+ 
+ echo "=== Enhanced Synology Thumbnail Cleanup ==="
+ echo "Target directory: $TARGET_DIR"
+ 
+ # 1. Stop indexing services temporarily
+ echo "Stopping indexing services..."
+ sudo synoservicectl --stop synoindexd 2>/dev/null || true
+ sudo synoservicectl --stop pkgctl-SynoFinder 2>/dev/null || true
+ 
+ # 2. Clear indexing queue to prevent regeneration
+ echo "Clearing indexing queue..."
+ sudo rm -f /var/spool/syno_indexing_queue* 2>/dev/null || true
+ 
+ # 3. Dry-run check (see what @eaDir directories exist)
+ echo "=== Existing @eaDir directories ==="
+ find "$TARGET_DIR" -type d -name '@eaDir' -exec echo '{}' \;
  
- # 2. Remove any existing @eaDir directories 
- find /volume1/Hydra/Creative/artsy -type d -name '@eaDir' -exec rm -rf '{}' \;
+ # 4. Remove any existing @eaDir directories 
+ echo "=== Removing existing @eaDir directories ==="
+ find "$TARGET_DIR" -type d -name '@eaDir' -exec rm -rf '{}' \; 2>/dev/null || true
  
- # 3. Rename eaDir_tmp to @eaDir (corrected syntax)
- find /volume1/Hydra/Creative/artsy -type d -name 'eaDir_tmp' -exec bash -c 'mv "$0" "${0%/*}/@eaDir"' {} \;
+ # 5. Rename eaDir_tmp to @eaDir (your custom thumbnails)
+ echo "=== Installing custom thumbnails ==="
+ find "$TARGET_DIR" -type d -name 'eaDir_tmp' -exec bash -c 'mv "$0" "${0%/*}/@eaDir"' {} \;
+ 
+ # 6. Protect custom thumbnails with read-only permissions
+ echo "=== Protecting custom thumbnails ==="
+ find "$TARGET_DIR" -type d -name '@eaDir' -exec chmod 555 '{}' \;
+ find "$TARGET_DIR" -path '*/@eaDir/*' -type f -exec chmod 444 '{}' \;
+ 
+ # 7. Create .noindex files to hint indexing services to avoid these directories
+ echo "=== Adding indexing exclusion hints ==="
+ find "$TARGET_DIR" -type d -name '@eaDir' -exec touch '{}/.noindex' \;
+ 
+ echo "=== Cleanup complete! ==="
+ echo "Note: Indexing services stopped. They may restart automatically."
+ echo "Run 'sudo synoservicectl --start synoindexd' if you need to re-enable indexing."

Thought ProcessNow let me also update the batch file to make it easier to use with the new enhanced script.


Cancelled