Page 1 of 1

[AMC] Force filebot to regornize file at Movies if duration is > to 1h15

Posted: 30 Mar 2017, 01:10
by Marbella
Hello.

Since i use filebot & inotify it doesn't specify labels so i tried to script something in AMC to force movies if lenght is superior to > 75 mins.

So i modified def forceMovie based on the lenght filter of forceAnime but i get this error :

Code: Select all

startup failed:
Script1.groovy: 61: expecting '}', found ')' @ line 61, column 164.
    '{minutes}').toInteger() < 60) }{ false
                                 ^

1 error

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 61: expecting '}', found ')' @ line 61, column 164.
    '{minutes}').toInteger() < 60) }{ false
                                 ^

1 error

        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:122)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:115)

Failure (°_°)

Here is my modified forceMovie in AMC :

Code: Select all

def forceMovie(f) {
label =~ /^(?i:Movie|Film|Concert|UFC)/ || f.dir.listPath().any{ it.name ==~ /(?i:Movies|Movie)/ } || f.isMovie() || getMediaInfo(f, '{minutes}').toInteger() < 60) }{ false }))
}	
How i could fix it ? Thanks in advance !

Re: [AMC] Force filebot to regornize file at Movies if duration is > to 1h15

Posted: 30 Mar 2017, 05:12
by rednoah
That's a reasonable addition. Probably. I'll think about adding it.

Re: [AMC] Force filebot to regornize file at Movies if duration is > to 1h15

Posted: 30 Mar 2017, 14:20
by Marbella
rednoah wrote:That's a reasonable addition. Probably. I'll think about adding it.
Yes,there isn't alot of movies who are an duration inferior to 1h15.
But do you have an idea about my error ? I don't know why it do it since forceAnime use the same line of code.

Thanks

Re: [AMC] Force filebot to regornize file at Movies if duration is > to 1h15

Posted: 30 Mar 2017, 19:23
by rednoah
Check the latest git commit. I'm using 100 minutes to avoid double episodes and movie-length episodes (e.g. Black Mirror).

Re: [AMC] Force filebot to regornize file at Movies if duration is > to 1h15

Posted: 30 Mar 2017, 19:32
by Marbella
rednoah wrote:Check the latest git commit. I'm using 100 minutes to avoid double episodes and movie-length episodes (e.g. Black Mirror).
Thanks. You are the best.