Page 1 of 1

Movie Collection Naming

Posted: 21 Dec 2016, 00:36
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

Re: Movie Collection Naming

Posted: 21 Dec 2016, 03:10
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()}

Re: Movie Collection Naming

Posted: 22 Dec 2016, 11:21
by SebasNights
Thank you for your help!

Re: Movie Collection Naming

Posted: 22 Dec 2016, 12:38
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('-')}

Re: Movie Collection Naming

Posted: 22 Dec 2016, 20:27
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.

Re: Movie Collection Naming

Posted: 23 Dec 2016, 04:10
by rednoah
Unfortunately that is not possible, because there is no (easy) way to list all movies for a given collection.