Page 1 of 1

Use collection if possible, otherwise default to movie name

Posted: 22 Mar 2016, 03:35
by sevenalive
I'm using this as my movie format (forgot where I got it from, probably github).

Code: Select all

E:\Movies\{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"} ({y}){" [$vf $vc $ac $af]"}

I been trying to figure out how I can keep the collection folder but not put the movie files in another folder. I don't want the movies in their own folder. I do like the collection folder though.

Currently it's:
Movies\collection name\movie name\movie name.mkv
Movies\movie name\movie name.mkv

I want:
Movies\collection name\movie.mkv
Movies\NoCollection.mkv

Re: Need help with movies and collections

Posted: 22 Mar 2016, 07:28
by rednoah
Use collection if possible, default to movie name:

Code: Select all

{any{collection}{n}}

Re: Use collection if possible, otherwise default to movie name

Posted: 07 Sep 2016, 06:59
by chocorem
is this

Code: Select all

{any{collection}{n}}
only to put in the movieformat ?

I tried to get

if a collection exist
/Movies/collection Name/movie1.mkv
/Movies/collection Name/movie2.mkv

if no collection
/Movies/movie.mkv

by putting

Code: Select all

{any{collection}{n}}
in movieformat option, I get

if collection
/collection Name1.mkv

if no collection
/Movie.mkv

so if collection, it is not generating the movie and put in the folder but only taking the colletion name as the movie name

Re: Use collection if possible, otherwise default to movie name

Posted: 07 Sep 2016, 07:42
by rednoah
You probably want something like this:

Code: Select all

{any{collection/ny}{ny}}

Re: Use collection if possible, otherwise default to movie name

Posted: 07 Sep 2016, 08:16
by chocorem
putting this inside

Code: Select all

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action move --conflict override -non-strict --log-file /var/log/filebot/amc-jdown.log --def movieFormat="Movies/{any{collection/ny}{ny}}" --def music=y artwork=y ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL"
does not give any movie name at all ...

Code: Select all

Rename movies using [TheMovieDB]
Auto-detect movie from context: [/mnt/raid0/medias/download/jd/xxxxxx.2.2016.FRENCH.BDRip.XViD-FUNKKY.zone-telechargement.com.avi]
[MOVE] Rename [/mnt/raid0/medias/download/jd/xxxxxx.2.2016.FRENCH.BDRip.XViD-FUNKKY.zone-telechargement.com.avi] to [/raid/medias/videos/Movies/.avi]

Re: Use collection if possible, otherwise default to movie name

Posted: 07 Sep 2016, 10:14
by chocorem
I was under 4.6 version, update to 4.7.2 solved the issue !

Re: Use collection if possible, otherwise default to movie name

Posted: 07 Sep 2016, 12:59
by rednoah
The {ny} binding is fairly new, so in older versions it won't work.

Re: Use collection if possible, otherwise default to movie name

Posted: 27 Sep 2016, 04:58
by chocorem
I'm trying to enhance my way of soring the movies

I actually have this movies format

Code: Select all

Blablabla/Blablabla (2016).mkv

Code: Select all

--def movieFormat="Movies/{any{localize.French.collection/localize.French.name/localize.French.name}{localize.French.name/localize.French.name}} ({y})"
I would like in case of no Collection, to have the Movie Year in Front of the Folder

Code: Select all

(2016) Blablabla/Blablabla (2016).mkv
Adding ({y}) didn't work (probably because of the any test) ?

Re: Use collection if possible, otherwise default to movie name

Posted: 27 Sep 2016, 05:45
by rednoah
Read this: viewtopic.php?f=5&t=1895

e.g.

Code: Select all

{any{collection}{"($y) $n"}}/{ny}