Start DSM Media Re-Indexing from PHP App

Currently reading
Start DSM Media Re-Indexing from PHP App

85
37
NAS
2x DS1621xs+, DS420+
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
I use a home-brew PHP application to manage media files, including the movement of .mkv and .m4v video files within DSM's indexed 'video' folder. The PHP apps run on the same server as the media files, under Web Station / Apache.

Unfortunately, files moved using PHP 'rename' do not trigger automatic DSM media re-indexing. I have not tried PHP 'copy', but the files are generally much too large to copy (vs move) in a reasonable amount of time.

Is there a way to trigger DSM media re-indexing from a PHP app? I'd like to eliminate the need to remember doing this as a manual step via the DSM Web Console.

Thanks for any suggestions, Ron
 
85
37
NAS
2x DS1621xs+, DS420+
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
The following PHP code appears to work as needed: exec('/usr/syno/bin/synoindex -R video');

Ron
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Similar threads

Top