Movie Collection Naming

All about user-defined episode / movie / file name format expressions
Post Reply
SebasNights
Posts: 6
Joined: 21 Dec 2016, 00:25

Movie Collection Naming

Post by SebasNights »

Hello, I'm having problems trying to get the collection year interval.

The desired naming is
The Matrix Collection (1999-2003)/The Matrix (1999)/The Matrix (1999) [1080p, x264, AC3 5.1].mkv

Now I have this
The Matrix Collection/The Matrix (1999)/The Matrix (1999) [1080p, x264, AC3 5.1].mkv

The code is

Code: Select all

{collection.upperInitial().colon(', ')+'/'}{n.upperInitial().colon(', ')} ({y})/{n.upperInitial().colon(', ')} ({y}) [{vf}, {vc}, {ac} {channels}]{subt != '.eng' ? subt.upperInitial() : ''}
Also I use a script that downloads the folder image for each movie, is there a way to download the collection image for that collection folder?

Thanks
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Movie Collection Naming

Post by rednoah »

The are no bindings for what you call the collection year interval and support is not planned because that information is not available in a single movie object.

If you process all movies at the same time, then the {model} binding will allow you to collect the values you want:

Code: Select all

{def cys = model.findAll{ it.collection == collection }.y; cys.min() + '-' + cys.max()}
:idea: Please read the FAQ and How to Request Help.
SebasNights
Posts: 6
Joined: 21 Dec 2016, 00:25

Re: Movie Collection Naming

Post by SebasNights »

Thank you for your help!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Movie Collection Naming

Post by rednoah »

r4665 adds the List.bounds() method to make these kinds of expressions easier on the eye:

Code: Select all

{model.findAll{ it.collection == collection }.y.bounds().join('-')}
:idea: Please read the FAQ and How to Request Help.
SebasNights
Posts: 6
Joined: 21 Dec 2016, 00:25

Re: Movie Collection Naming

Post by SebasNights »

Is there a way to do it "real" with scripts? Because I don't have all the movies and some even are not released yet. I also want to retrieve the collection poster.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Movie Collection Naming

Post by rednoah »

Unfortunately that is not possible, because there is no (easy) way to list all movies for a given collection.
:idea: Please read the FAQ and How to Request Help.
Post Reply