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

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Marbella
Posts: 11
Joined: 09 Mar 2017, 22:39

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

Post 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 !
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

That's a reasonable addition. Probably. I'll think about adding it.
:idea: Please read the FAQ and How to Request Help.
Marbella
Posts: 11
Joined: 09 Mar 2017, 22:39

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

Post 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
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

Check the latest git commit. I'm using 100 minutes to avoid double episodes and movie-length episodes (e.g. Black Mirror).
:idea: Please read the FAQ and How to Request Help.
Marbella
Posts: 11
Joined: 09 Mar 2017, 22:39

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

Post 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.
Post Reply