Crash on Synology

Any questions? Need some help?
Post Reply
zaithefirst
Posts: 11
Joined: 04 Mar 2013, 21:08

Crash on Synology

Post by zaithefirst »

Hello,

I encountered today a problem while running the filebot sorting script.
I did try to update the jar using the latest release (4.5.3), but now I have a different error. The script exits with the below message:

Code: Select all

Dec 23, 2014 12:11:34 AM net.filebot.Main initializeCache
WARNING: App version (r2729) does not match cache version (r0): reset cache
MissingPropertyException: No such property: _log for class: Script1
Possible solutions: log, now, _def, _args
groovy.lang.MissingPropertyException: No such property: _log for class: Script1
Possible solutions: log, now, _def, _args
        at Script1$_run_closure5.doCall(Script1.groovy:54)
        at Script1.run(Script1.groovy:15)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
        at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:112)
        at net.filebot.Main.main(Main.java:170)
MissingPropertyException: No such property: _log for class: Script1
Possible solutions: log, now, _def, _args
groovy.lang.MissingPropertyException: No such property: _log for class: Script1
Possible solutions: log, now, _def, _args
        at Script1$_run_closure5.doCall(Script1.groovy:54)
        at Script1.run(Script1.groovy:15)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
        at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:112)
        at net.filebot.Main.main(Main.java:170)
could you please help?

Thanks a lot
User avatar
rednoah
The Source
Posts: 23066
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Crash on Synology

Post by rednoah »

The script you're using hasn't been updated for FileBot 4.2+

Which "sorting" script? There is no script called "sorting".
:idea: Please read the FAQ and How to Request Help.
zaithefirst
Posts: 11
Joined: 04 Mar 2013, 21:08

Re: Crash on Synology

Post by zaithefirst »

Hello
Thanks for your quick reply. It is a copy of the sortivo script in which I changed the naming pattern.
You can find below the script itself:

Code: Select all

// filebot -script fn:sortivo <folder> --output path/to/folder [-non-strict] --def subtitles=en

// process only media files
def input = args.getFiles{ it.isVideo() || it.isSubtitle() }

// ignore clutter files
input = input.findAll{ !(it.path =~ /\b(?i:sample|trailer|extras|deleted.scenes|music.video|scrapbook)\b/) }

// print input fileset
input.each{ println "Input: $it" }
def subtitles = tryQuietly{ subtitles.toBoolean() ? ['en'] : subtitles.split(/[ ,|]+/).findAll{ it.length() >= 2 } }
/*
 * Move/Rename a mix of episodes and movies that are all in the same folder.
 */
def groups = input.groupBy{ f ->
	def tvs = detectSeriesName(f)
	def mov = (parseEpisodeNumber(f) || parseDate(f)) ? null : detectMovie(f, false) // skip movie detection if we can already tell it's an episode
	println "$f.name [series: $tvs, movie: $mov]"
	
	// DECIDE EPISODE VS MOVIE (IF NOT CLEAR)
	if (tvs && mov) {
		def norm = { s -> s.lower().space(' ') }
		def fn = norm(f.nameWithoutExtension)
		def sn = norm(tvs)
		def mn = norm(mov.name)
		
		// S00E00 | 2012.07.21 | One Piece 217 | Firefly - Serenity | [Taken 1, Taken 2, Taken 3, Taken 4, ..., Taken 10]
		if (parseEpisodeNumber(fn, true) || parseDate(fn) || (fn =~ sn && parseEpisodeNumber(fn.after(sn), false)) || fn.after(sn) =~ / - .+/ || f.dir.listFiles{ it.isVideo() && norm(it.name) =~ sn && it.name =~ /\b\d{1,3}\b/}.size() >= 10) {
			println "Exclude Movie: $mov"
			mov = null
		} else if ((detectMovie(f, true) && fn =~ /(19|20)\d{2}/) || (fn =~ mn && !(fn.after(mn) =~ /\b\d{1,3}\b/))) {
			println "Exclude Series: $tvs"
			tvs = null
		}
	}
	
	return [tvs:tvs, mov:mov]
}

groups.each{ group, files ->
	// fetch subtitles
	if (subtitles) {
		subtitles.each{ languageCode ->
			def subtitleFiles = getMissingSubtitles(file:files, output:'srt', encoding:'UTF-8', lang:languageCode, strict:true) ?: []
			files += subtitleFiles
			//tempFiles += subtitleFiles // if downloaded for temporarily extraced files delete later
		}
	}
	
	// EPISODE MODE
	if (group.tvs && !group.mov) {
		rename(file:files, format:'series/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}', db:'TheTVDB')
	}
	
	// MOVIE MODE
	if (group.mov && !group.tvs) {
		rename(file:files, format:'movies/{n}_({y})_({imdb.rating})/{n}_({y})_{genres}_IMDB({imdb.rating}){pi}', db:'IMDB')
	}
}

Thanks
User avatar
rednoah
The Source
Posts: 23066
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Crash on Synology

Post by rednoah »

The script you're running references a variable called "_log" which is now called "log". The script you posted doesn't reference either. So the script you posted is completely unrelated to the error you posted.

I don't support custom scripts, so you'll have to maintain it yourself. My scripts on GitHub should work fine for the latest app version.
:idea: Please read the FAQ and How to Request Help.
Post Reply