same movie with same name in 2 diff. languages

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

same movie with same name in 2 diff. languages

Post by kim »

I'm trying to do this using AMC:

if the new scraped path exists,
then use a diff. rename format

it must be something to do with ?:
def dest = rename(file:files, format:format.mov, db:'TheMovieDB')

or can it be done within the format only ? // best option
or ?

it most move all movies to their own folder with pics + nfo

result:
movie (year) // only use movie [DK] (year) if movie (year) exists
or movie (year) + movie [DK] (year)


EDIT:
looks like it works in GUI but not in amc format :(
{def destfolder = file.parentFile/ny as File; !destfolder.exists() ? n+' [DK] '+'('+y+')': ny}/{fn}
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: same movie with same name in 2 diff. languages

Post by kim »

This works in amc format:
{def outputFolder = new File('D:/_DoWnLoaD/Done/Scaped/Movies' ?: '.').getCanonicalFile(); def nyformat = ny; def nydkformat = (n+' [DK] '+'('+y+')'); def destfolder = (outputFolder/nyformat) as File; destfolder.exists() ? nydkformat : ny }/{fn}

anyway make this work inside the format?:
def outputFolder = new File(_args.output ?: '.').getCanonicalFile()

outputFolder or _args.output ???

(so I don't need to hard code dest path in format)
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: same movie with same name in 2 diff. languages

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: same movie with same name in 2 diff. languages

Post by kim »

{def outputFolder = new File(output ?: '.').getCanonicalFile(); def nyformat = ny; def nydkformat = (n+' [DK] '+'('+y+')'); def destfolder = (outputFolder/Movies/nyformat) as File; destfolder.exists() ? nydkformat : ny }/{fn}

=
Argument: C:\Windows\System32\override
File not found: C:\Windows\System32\override
Failure (°_°)


in GUI
{output}
java.lang.NullPointerExecption
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: same movie with same name in 2 diff. languages

Post by rednoah »

{output} is not defined, if --output is not set, thus it will not work in the GUI (by default, assuming --output is not passed as argument):

Code: Select all

filebot -list --q "firefly" --output "/path/to/output" --format "{output}"
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: same movie with same name in 2 diff. languages

Post by kim »

in clean groovy file:

def outputFolder = {output}
println outputFolder
=
Script1$_run_closure5@2df3b89c


It does not work or you need to "dumb it down" for me

EDIT:
looks like I finally got it :) thx

Code: Select all

Movies/{def nyformat = ny; def nydkformat = (n+' [DK] '+'('+y+')'); def outputFolder = output/'Movies'/nyformat; outputFolder.exists() ? nydkformat : ny }/{fn}
Post Reply