Synology NAS does not re-index after rename

Any questions? Need some help?
Post Reply
VAB
Posts: 1
Joined: 28 Feb 2013, 21:06

Synology NAS does not re-index after rename

Post by VAB »

Hi,
I'm using filebot on a Synology NAS to rename my episodes. I rename my files from a "Downloads" folder to something like /Series_name/Season_number/episode. The problem is that after the filebot renaming process, my NAS does not detect any change on the files, and does not reindex correctly the episode. As a result, the video doesn't appear in the folder when browsing the media server.
Calling synoindex -a "episode_name.mkv" seems to resolve de problem, but I'd like to automate that, and I don't know how to retrieve the path computed by filebot.
Is there anyone else that encounters this problem? Little help would be great :)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology NAS does not re-index after rename

Post by rednoah »

Use filebot rename history. Check into filebot -script fn:history ... That'll give you new paths line by line, just pipe the output and run your own command for each path.

More info:
http://wacha.ch/wiki/synology

EDIT: Updated the latest AMC with a sort of find -exec feature for processed files.

e.g.

Code: Select all

--def "exec=synoindex -a \"{file}\""
:idea: Please read the FAQ and How to Request Help.
hakzard
Posts: 5
Joined: 24 Apr 2013, 07:10

Re: Synology NAS does not re-index after rename

Post by hakzard »

I'm having an issue using the "exec=synoindex -a \"{file}\"" command on my Synology box.
I've made a bash script:

Code: Select all

#!/bin/sh
#filebot_rename.sh
filebot -script fn:amc -rename "$1" --action copy --db thetvdb -non-strict --output "/volume1/video/" --def "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "exec=synoindex -a \"{file}\""
But I get and error:

Code: Select all

Parameter: seriesFormat = TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}
Parameter: exec = synoindex -a "{file}"
Argument: /volume1/downloads/Revolution.2012.S01E14.HDTV.x264.mp4
Input: /volume1/downloads/Revolution.2012.S01E14.HDTV.x264.mp4
Group: [tvs:Revolution] => [Revolution.2012.S01E14.HDTV.x264.mp4]
Rename episodes using [TheTVDB]
Auto-detected query: [Revolution, Revolution 2012]
Fetching episode data for [Revolution]
Fetching episode data for [Revolution]
Fetching episode data for [Evolution]
Fetching episode data for [TV Revolution]
Fetching episode data for [Revolution 618]
Fetching episode data for [Love Revolution]
Fetching episode data for [Food Revolution]
Fetching episode data for [Revolutionary War]
[COPY] Rename [/volume1/downloads/Revolution.2012.S01E14.HDTV.x264.mp4] to [/volume1/video/TV/Revolution/Season 01/Revolution S01E14 - The Night the Lights Went Out in Georgia.mp4]
Processed 1 files
Execute: synoindex -a "/volume1/video/TV/Revolution/Season 01/Revolution S01E14 - The Night the Lights Went Out in Georgia.mp4"
IOException: error=2, No such file or directory
java.io.IOException: error=2, No such file or directory
	at Script2.execute(Script2.groovy:149)
	at Script3$_run_closure31.doCall(Script3.groovy:229)
	at Script3.run(Script3.groovy:226)
	at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
	at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
	at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
	at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (?_?)
It works if I run the below command after.

Code: Select all

synoindex -a "/volume1/video/TV/Revolution/Season 01/Revolution S01E14 - The Night the Lights Went Out in Georgia.mp4"
Am I doing something wrong?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology NAS does not re-index after rename

Post by rednoah »

Java can't execute synoindex because it can't find the executable. Either specify the full path to the executable or symlink it into one of the default paths like /usr/bin.

Or better yet, execute with bash! Then it must be the same! :D

Code: Select all

/bin/bash -c synoindex ...
:idea: Please read the FAQ and How to Request Help.
hakzard
Posts: 5
Joined: 24 Apr 2013, 07:10

Re: Synology NAS does not re-index after rename

Post by hakzard »

Thanks for the quick relay.

I have tried /bin/ash no /bin/bash on synology?

Code: Select all

/bin/ash -c synoindex -a \"{file}\""
also tried

Code: Select all

/usr/syno/bin/synoindex -a \"{file}\""
both error?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology NAS does not re-index after rename

Post by rednoah »

Seems to be generally broken. No idea why nobody noticed before...
:idea: Please read the FAQ and How to Request Help.
hakzard
Posts: 5
Joined: 24 Apr 2013, 07:10

Re: Synology NAS does not re-index after rename

Post by hakzard »

Ok Thanks will wait for an update.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology NAS does not re-index after rename

Post by rednoah »

Try r1617
:idea: Please read the FAQ and How to Request Help.
hakzard
Posts: 5
Joined: 24 Apr 2013, 07:10

Re: Synology NAS does not re-index after rename

Post by hakzard »

Sorry I'm new to this how do I get and install r1617?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology NAS does not re-index after rename

Post by rednoah »

1. FAQ will point you here => http://sourceforge.net/projects/filebot ... ebot/HEAD/
2. Replace FileBot.jar in the install folder with the new one
:idea: Please read the FAQ and How to Request Help.
hakzard
Posts: 5
Joined: 24 Apr 2013, 07:10

Re: Synology NAS does not re-index after rename

Post by hakzard »

I have updated to r1617 now I don't get an error but It doesn't index the file.
I have sorted this for myself my setting up a watch on the folder using pyinotify to run synoindex when a file is created.

The Problem I'm having now is filebot running very slowly sometime. I've been waiting 30 minutes on "Auto-detected query:"
Is there anything I can do to speed this up?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology NAS does not re-index after rename

Post by rednoah »

Try using the the latest Java 8 beta release. Seems to have helped for other people.
:idea: Please read the FAQ and How to Request Help.
terra17
Posts: 47
Joined: 06 Sep 2014, 11:10

Re: Synology NAS does not re-index after rename

Post by terra17 »

Hi !! i'm trying to resolve the same problem on my nas 213j, some news about synoindex ?
Achandab
Donor
Posts: 109
Joined: 04 Nov 2013, 21:20

Re: Synology NAS does not re-index after rename

Post by Achandab »

Guys, Synology NAS does not detect changed files in the media server folder. Have confirmed this with Synology themselves. So i have set a scheduled task to run every night. So the next day all my media is up to date and available.

Command

"synoindex -R all"

Let me know if that works for you.
terra17
Posts: 47
Joined: 06 Sep 2014, 11:10

Re: Synology NAS does not re-index after rename

Post by terra17 »

you're right ! i found this solution too !

i set

"synoindex -R /path/to/video "
Achandab
Donor
Posts: 109
Joined: 04 Nov 2013, 21:20

Re: Synology NAS does not re-index after rename

Post by Achandab »

terra17 wrote:you're right ! i found this solution too !

i set

"synoindex -R /path/to/video "

glad it helped :)
Post Reply