Help with Collections

All about user-defined episode / movie / file name format expressions
Post Reply
bookedirl
Posts: 17
Joined: 09 Oct 2015, 14:31

Help with Collections

Post by bookedirl »

I'm using my RasberryPi to sort out my media files as I download them and so far its been great. I have my format very simple and I would like to take it one step further. I would like to put collections of movies in just one folder and not Collection Folder>Movie Folder>Movie Name.mp4

Here's what I'm using now:

Code: Select all

Movies/{collection+'/'}{n} ({y})/{n} ({y}){' CD'+pi}
I've been using the GUI to test out different formats but I can't figure out a way to either only use collections part of the script if it is a collection or if it is a collection skip the first set of {n} ({y}).

Exp:
I want this
Aliens Collection/Alien (1979).mp4
Aliens Collection/Aliens (1986).mp4


Instead of this:
Aliens Collection/Alien (1979)/Alien (1979).mp4
Aliens Collection/Aliens (1986)/Aliens (1986).mp4


Any help would be appreciated!
Pab
Posts: 11
Joined: 18 Oct 2015, 21:45

Re: Help with Collections

Post by Pab »

Is it something like this you are after?

Code: Select all

Movies/{collection ? collection : n (y)}/{n} ({y}){' CD'+pi}
The brackets statement gives the collection if its in a collection, otherwise the name and year
bookedirl
Posts: 17
Joined: 09 Oct 2015, 14:31

Re: Help with Collections

Post by bookedirl »

Pab wrote:Is it something like this you are after?

Code: Select all

Movies/{collection ? collection : n (y)}/{n} ({y}){' CD'+pi}
The brackets statement gives the collection if its in a collection, otherwise the name and year
Perfect! This is exactly what I was looking for :)

Thank you very much!
User avatar
rednoah
The Source
Posts: 23939
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with Collections

Post by rednoah »

Here's a correct solution for this problem:

Code: Select all

Movies/{any{collection}{n+'('+y+')'}}/{n} {'('+y+')'}{' CD'+pi}
:idea: Please read the FAQ and How to Request Help.
bookedirl
Posts: 17
Joined: 09 Oct 2015, 14:31

Re: Help with Collections

Post by bookedirl »

rednoah wrote:Here's a correct solution for this problem:

Code: Select all

Movies/{any{collection}{n+'('+y+')'}}/{n} {'('+y+')'}{' CD'+pi}
Thanks Rednoah. What's the difference between your way and Pabs? When I put both into filebot they appear to give the same naming. Either way thanks again!
User avatar
rednoah
The Source
Posts: 23939
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with Collections

Post by rednoah »

My solution works, the other does not.

This piece of the code is completely wrong {collection ? collection : n (y)} and is effectively equivalent to just {collection}.
:idea: Please read the FAQ and How to Request Help.
Post Reply